Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: steever on February 04, 2008, 01:49:19 PM
-
Hi. I read with interest this fragment of the wiki:
Shadow Copy
Letting network users restore previous versions via Explorer has dramatically reduced the need for me to involve myself in restoring files and is a tremendous timesaver overall.
This is already implemented, it just needs verification it works.
I had a look at the associated bug tracker entry ...
http://bugs.contribs.org/show_bug.cgi?id=1549
but I am still not sure about the project's status, installation and use.
Could someone enlighten us all about the power of this contrib? It sounds great.
Thanks
-
steever
Based on that bug report and my reading of it, and some limited testing just now, Comment#9 has the details, with a rpm version requirement specified in Comment#7
To check the installed rpm version
rpm -qa e-smith-samba
On my sme7.3 sme this gives
e-smith-samba-1.14.1-3.el4.sme
so the required rpm is more recent than that specified (e-smith-samba-1.14.0-20)
Initially disable ShadowCopy for specific ibays or users you don't wish to take snapshots for
eg
db accounts setprop user1 ShadowCopy disabled
db accounts setprop user2 ShadowCopy disabled
db accounts setprop ibay1 ShadowCopy disabled
db accounts setprop ibay2 ShadowCopy disabled
Note: For the script to work correctly, leave two or more users enabled
Then enable and expand templates
config setprop smb ShadowCopy enabled
signal-event ibay-modify Primary
You need to schedule shadow copy to take snapshots.
You can do this manually from the command prompt
or run a cron job as often as required.
Snapshots are only taken if there are changes.
/etc/e-smith/events/actions/shadow-copy-rotate
Note: You will need enough space free to take a copy of the entire /home/e-smith/files directory plus any
changes that take place.
A suitable cron job that runs the script every hour from 10am to 5pm on weekdays would contain
Create a file
/etc/cron.d/shadowcopysnapshot
which contains
# Shadow Copy snapshot Crond Entry
#+-----------------------Minute (0-59)
#| +-------------------Hour of Day (0-23)
#| | +---------------Day of Month (1-31)
#| | | +-----------Month of Year (1-12)
#| | | | +-------Day of Week (0=Sun,6=Sat)
#v v v v v
00 10,11,12,13,14,15,16,17 * * 1,2,3,4,5 root /etc/e-smith/events/actions/shadow-copy-rotate
After saving the above script do
/etc/init.d/crond restart
In Windows access the snapshot files via Windows Explorer properties page
A Windows client exists in WinXP SP2
To obtain a client for Windows 2000SP3+ download from here
http://technet.microsoft.com/en-gb/windowsserver/bb405951.aspx
Feedback to the bug tracker at
http://bugs.contribs.org/show_bug.cgi?id=1549
-
steever & all
I have added this:
http://wiki.contribs.org/ShadowCopy
Please try it & test the functionality.
Report contrib problems to the bug tracker, and howto problems here.
-
Wow! Thanks Ray. ShadowCopy certainly is a Windows SBS Killer. Especially since Microsoft isn't making a 2008 version. Can I ask for a clarification? Is ShadowCopy enabled by default then for all users/ibays? I'd hate to have to enable it manually for every new user.
Once again, nice work all involved.
Steve
-
steever
Is ShadowCopy enabled by default then for all users/ibays?
Yes, for ibays & users home folders.
-
steever
Yes, for ibays & users home folders.
So what happens when you add a new user / ibay after setting up shadowcopy? Do you need to remove them manually if you don't want them enabled?
I got a quick question on shadocopy, before using it. Does it simple save the updated files in a hidden folder in the current folder? Let's say I have //intranet/data/docs/clients/client1 and I change a word document in that folder, does it simply add a hidden folder //intranet/data/docs/clients/client1/.shadow/1 to that folder, and the same for //intranet/data/docs/clients/client2 & //intranet/data/docs/clients/client3 ?
But I also understand that it only copies changed files, so not all files are backed up, right? Thus, in essence, it's a live incremental backup, easy for users to quickly restore accidentally deleted files?
And I also presume that all the hidden folders & shadow-copies files will be backed up to the USB backup?
-
SoftDux
Howto has been updated, it should answer your questions
http://wiki.contribs.org/ShadowCopy
I also understand that it only copies changed files, so not all files are backed up, right? Thus, in essence, it's a live incremental backup, easy for users to quickly restore accidentally deleted files?
No not for deleted files, it makes copies of changed files. It does keep old copies, so you can revert to a previous version of the same file.
All data in /home/e-smith/ (which includes the ShadowCopy folders) is included in standard backups.
-
Thank you, RayMitchell
-
SoftDux
I corrected my earlier post to say
All data in /home/e-smith/ (which includes the ShadowCopy folders) is included in standard backups.
as ShadowCopy folder are in
/home/e-smith/files/.shadow/1
/home/e-smith/files/.shadow/2
etc etc
-
ShadowCopy certainly is a Windows SBS Killer. Especially since Microsoft isn't making a 2008 version....
Really? Maybe someone should tell MS then :-)
http://www.microsoft.com/windowsserver/essential/sbs/default.mspx
-
Awesome contrib... thanks for making it so simple for us!!
One question, is is possible to limit the space used by the snapshots? I have a server that is just under half usable disk space, but would like to enable the shadow-copies. Is it possible to specify a quota for that folder or tell the service to only use XX% of the disk space (like Windows Server does)?
Thanks... great software!!!
-
Really? Maybe someone should tell MS then :-)
It was true when I posted that comment, a year ago!
-
One question, is is possible to limit the space used by the snapshots? I have a server that is just under half usable disk space, but would like to enable the shadow-copies. Is it possible to specify a quota for that folder or tell the service to only use XX% of the disk space (like Windows Server does)?
I have the same questions :-?
I enabled shadowcopy per the wiki, and then over the next 24 hours my server happily proceeded to fill up the main drive (which previously was 34% used) with what looks like three snapshots of the entire ibays, even though there had been only minimal changes to some files in this time.
I've now disabled shadowcopy and am in the process of deleting the snapshots to free up space.
Googling for hints, there appears to be other implementations of samba's shadow copies where you can control snap size, free space, size increments etc. eg http://wiki.samba.org/index.php/Shadow_Copies_with_Snapshots_Script
These options don't seem to appear in the shadow-copy-rotate script in SME Server. The only options I've found for relate to smb config settings ShadowCount (default 10) and ShadowDir, but can't find any further documentation on these.
Am I missing something in my naive newbiness ? Is there no way to control the size of the snapshots ? Why did shadowcopy attempt to make repeated complete copies of my ibays ? Have I just used up my quota of questions ?
thanks
Geoff