rsyncing from Windows 2003 shadow copies.
Craig at sbisolutions.com.au
Thu Sep 14 09:08:04 GMT 2006
Hopefully this isn't duplicating info. If so, sorry for the noise.
I tried searching through old posts to this list about this issue, but
couldn't find anything that worked.
Below is a script I have put together that lets you rsync from a Windows
2003 shadow copy without having to copy files out of it first.
You can link the shadow copy to either a drive letter or to a folder.
You then rsync from there. The shadow copy is then deleted when the
Hopefully this helps someone.
you need vshadow.exe which is part of the VSS SDK which is a free
download from MS.
I'm sure this can be improved on. I welcome any feedback.
@REM test if we are called by shadowrsync.cmd
if NOT "%CALLBACK_SCRIPT%"=="" goto :IS_CALLBACK
@REM Set these variables to what you need.
@REM SHADOW_DRIVE_LETTER is an existing drive you want to shadow
@REM MAP_SHADOW_TO needs to be either a drive letter that isn't
@REM currently in use, or an empty directory
@REM eg. x: or c:\temp\shadowcopy
@REM Create the shadow copy - and generate env variables into a
@REM Then resursively come back into this script.
@echo ...Create the shadow copy...
vshadow.exe -nw -p -script=%TEMP_GENERATED_SCRIPT%
del /f %TEMP_GENERATED_SCRIPT%
@REM Get the vshadow temp variables.
@REM Map the drive to the shadow copy
@REM Now do your rsync thing
rsync blah blah blah blah........
@REM Delete the shadow
More information about the rsync