Hi List, I recently stumbled across this blog post:
"How to assign a drive letter or directory to a shadow copy" http://blogs.msdn.com/adioltean/archive/2005/01/20/357836.aspx In which "AdiOltean" (who works for MS, apparently) presents a simple script, which creates a persistent Shadow Copy and assigns it a drive letter (requires Windows 2003 Server) Very useful stuff ! That script used as a “DumpPreUserCmd” helps if you need to backup open files! (or in my case it keeps the downtime of our Domino Server to less than one minute ..) What I’ve done to utilize this with backuppc: Installed MS Volume Shadow Copy Service SDK 7.2 (you don’t need the whole SDK later – just the vshadow.exe) http://www.microsoft.com/downloads/details.aspx?FamilyID=0B4F56E4-0CCC-4626-826A-ED2C4C95C871&displaylang=en As I’m using rsyncd with this server I installed cwRsyncServer (cygwin / MS SFU with rsync and openssh or just some sshd with smb should work as well) http://www.itefix.no/phpws/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=6&MMN_position=23:23 Next step is to configure everything just as one normally would: * Make sure ssh connectivity works - add public key to authorized_keys and connect as backuppc user * Make sure rsyncd works as expected – create rsyncd.conf and rsyncd.secrets * Make sure backuppc configuration is right - make a test backup After that I copied the “CreateShadow.cmd from “Antimail” and modified it slightly (it now creates a RemoveShadow.cmd) my version looks like this: ---------- ### set path (needed for execution by cygwin) cd C:\Programme\cwRsyncServer ### change driveletters in rsyncd.conf for backup COPY rsyncd_backup rsyncd.conf setlocal if NOT "%CALLBACK_SCRIPT%"=="" goto :IS_CALLBACK set SOURCE_VOLUME=%1 set DESTINATION_VOLUME=%2 set CALLBACK_SCRIPT=%~dpnx0 set TEMP_GENERATED_SCRIPT=GeneratedVarsTempScript.cmd %~dp0\vshadow.exe -nw -p -script=%TEMP_GENERATED_SCRIPT% -exec=%CALLBACK_SCRIPT% %SOURCE_VOLUME% del /f %TEMP_GENERATED_SCRIPT% @goto :EOF :IS_CALLBACK setlocal call %TEMP_GENERATED_SCRIPT% %~dp0\vshadow.exe -el=%SHADOW_ID_1%,%DESTINATION_VOLUME% ### Create RemoveShadow.cmd and change rsyncd.conf back for restore @echo cd C:\Programme\cwRsyncServer > RemoveShadow.cmd @echo VSHADOW.EXE -ds=%SHADOW_ID_1% >> RemoveShadow.cmd @echo COPY rsyncd_restore rsyncd.conf >> RemoveShadow.cmd ---------- My server config.pl in backuppc looks like that : # Rsync ‘share’ $Conf{RsyncShareName} = ['cDrive']; # create shadow copy $Conf{DumpPreUserCmd} = '$sshPath -q -x -l SvcwRsync $host /CreateShadow.cmd c: z:'; # remove shadow copy $Conf{DumpPostUserCmd} = '$sshPath -q -x -l SvcwRsync $host /RemoveShadow.cmd'; ---------- To make sure the backup uses drive ‘z’ (the shadow copy) but the restore writes on drive ‘c’ I let the script move the rsyncd.conf around - copy that is – cwRsyncServer doesn’t support mv :-) Rsyncd_backup (becomes rsyncd.conf before dump starts): [cDrive] path = /cygdrive/z comment = Entire Drive exclude = pagefile.sys /RECYCLER/ /Temp/ /System*Volume*Information/ ---------- Rsyncd_restore (becomes rsyncd.conf after dump finishes): [cDrive] path = /cygdrive/c comment = Entire Drive exclude = pagefile.sys /RECYCLER/ /Temp/ /System*Volume*Information/ And that’s about it ….. Greetings and Thanks for this excellent App ! Dominik Hoffmann IT-Administrator ----------- Ortszeit: Montag, 20. Februar 2006 20:09:26 (GMT+01:00) Mitteleuropäische Zeit wob AG Werner-Heisenberg-Strasse 6a-10 68519 Viernheim http://www.wob.ag http://www.bbn-advertising.com Part of: BBN International Brand Communication
