Difference between revisions of "ShadowCopy"

From SME Server
Jump to navigationJump to search
m (Draft status removed, minor text changes)
Line 1: Line 1:
 
== ShadowCopy ==
 
== ShadowCopy ==
 
DRAFT HOWTO
 
  
  
Line 12: Line 10:
 
To obtain a client for Windows 2000SP3+ download from [http://technet.microsoft.com/en-gb/windowsserver/bb405951.aspx here].
 
To obtain a client for Windows 2000SP3+ download from [http://technet.microsoft.com/en-gb/windowsserver/bb405951.aspx here].
  
This functionality is included in e-smith-samba, but requires further testing and verification
+
This functionality is included in e-smith-samba since version 1.14.0-20.
 
 
It requires e-smith-samba-1.14.0-20
 
 
 
SME Server 7.3 has e-smith-samba-1.14.1-3.el4.sme
 
  
 
Please report any bugs to [[bugzilla:1549]].
 
Please report any bugs to [[bugzilla:1549]].
Line 36: Line 30:
 
  db accounts setprop ibay2 ShadowCopy disabled
 
  db accounts setprop ibay2 ShadowCopy disabled
  
{{Note box|For the script to work correctly, leave two or more users enabled.}}
+
{{Note box|For the script to work correctly, leave two or more users enabled. This is a bug in the current package and is being looked at in bugzilla.}}
 +
 
  
 
To re-enable any disabled ibays or users do:
 
To re-enable any disabled ibays or users do:
Line 55: Line 50:
 
{{Note box|You will need enough free disk space to take a copy of the entire /home/e-smith/files directory plus any changes that take place.}}
 
{{Note box|You will need enough free disk space 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 the following:
+
 
 +
A suitable cron job that runs the script every hour from 10am to 5pm on weekdays would contain the following (adjust to suit your requirements):
  
 
Create a file
 
Create a file
Line 77: Line 73:
 
After saving the above script do
 
After saving the above script do
 
  /etc/init.d/crond restart
 
  /etc/init.d/crond restart
 +
  
 
In Windows access the snapshot files via Windows Explorer file properties page, Previous Versions tab.
 
In Windows access the snapshot files via Windows Explorer file properties page, Previous Versions tab.

Revision as of 00:51, 29 February 2008

ShadowCopy

Overview

This Howto is based on information contained in bugzilla:1549.

ShadowCopy takes a snapshot of ibays and user home folders at scheduled intervals and allows network users to restore previous versions of files via the Windows Explorer file properties page. A client is installed by default in Windows XP. To obtain a client for Windows 2000SP3+ download from here.

This functionality is included in e-smith-samba since version 1.14.0-20.

Please report any bugs to bugzilla:1549.

Configuration

To check the installed rpm version

rpm -q e-smith-samba

On a SME Server 7.3 server this gives e-smith-samba-1.14.1-3.el4.sme so the installed rpm is more recent than that required (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


Important.png Note:
For the script to work correctly, leave two or more users enabled. This is a bug in the current package and is being looked at in bugzilla.



To re-enable any disabled ibays or users do:

db accounts delprop user1 ShadowCopy
db accounts delprop ibay2 ShadowCopy

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.

At the command prompt do

/etc/e-smith/events/actions/shadow-copy-rotate
Important.png Note:
You will need enough free disk space 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 the following (adjust to suit your requirements):

Create a file

pico -w /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

To save

Ctrl o 

To exit

Ctrl x

After saving the above script do

/etc/init.d/crond restart


In Windows access the snapshot files via Windows Explorer file properties page, Previous Versions tab.

A Windows client exists in WinXP SP2

To obtain a client for Windows 2000SP3+ download from here.

ShadowCopy files are located in:

/home/e-smith/files/.shadow/1
/home/e-smith/files/.shadow/2
/home/e-smith/files/.shadow/3
and so on...

The number of subfolders depends on how many snapshots have been taken.

The maximum number of snapshots is 64.

Note that a new snapshot is only taken if files have changed.

Feedback to the bug tracker at bugzilla:1549

References:

bugzilla:1549

Shadow Copy topic in the Contribs forums

For background information regarding alternative Linux implementation, although this contrib is not used here

http://www.wlug.org.nz/SambaShadowCopyHowto