Nice. Especially for clients where you're only really worried about the
data on the machine. But using "systemstate" may not allow you to do a
true bare metal restore of a windows box. For a bare metal restore
(servers, etc), I'd recommend doing an ASR backup of servers
periodically in ADDITION to the backuppc backups. That way you can use
the ASR restore during the Windows install process to get back to a
stable system then use backuppc to restore the newest incremental.
Something like
ntbackup.exe asrbackup /J "Full ASR Backup of C" /f "D:\C-asr.bkf" /V:yes
works ("asrbackup" backups also use VSS internally and are a superset of
"systemstate" backups). Drop this disk image on D: or some other FAT32
partition and have backuppc pick it up. Since the resulting backup file
is a disk image, you'll want to keep C: as small as possible. Ideally
just the OS, or the OS plus your core applications. Store everything
else in DFS or on another local partition. For data integrity, make D: a
separate physical disk if you can.
For a bare-metal restore, you simply use the newest image on D:, or in
the event it's not available, copy it onto D: via your favorite occult
method (Knoppix would work well, but since D: is FAT32, there are other
options).
Hope someone finds this useful!
[EMAIL PROTECTED] wrote:
>
> Hi,
>
> I've been asked to share how I solved to backup open and locked Files
> under Windows 2003 using ShadowCopies - so here it goes.
> Please notice that everything I describe here is just ‘puzzeled’
> together from various sources – my own scripting skills are very
> limited –
> so maybe you’ll come up with a more elegant solution after reading this…
>
> Basically I stumbled across this Post on Adi Olean’s Weblog (Antimail):
>
> Attack of the clones: how to assign a drive letter or directory to a
> shadow copy
> _http://blogs.msdn.com/adioltean/archive/2005/01/20/357836.aspx_
>
> The above works only on Windows 2003 Server – but here is another
> Script from Adi Olean that will copy a single opened file and that one
> should work under XP as well:
>
> Script recipe of the week: how to copy an opened file
> _http://blogs.msdn.com/adioltean/archive/2005/01/05/346793.aspx_
>
> For theses scripts to work you’ll need the VSHADOW.EXE which is part
> of MS VSS SDK. Explained in more detail here:
> http://blogs.msdn.com/adioltean/archive/2004/12/30/344476.aspx
>
> I have to backup Windows 2003 Servers – so I chose the simple approach
> to call the first batch script as a backuppc predump script, which
> gives me a shadow copy of an entire volume (say C:) and mounts it
> under another drive letter (say X:). I extended the script slightly to
> create a backup of the systemstate with ntbackup and to write out a
> RemoveShadowCopy Batch which than can be called as postdump once
> backuppc has finished.
>
> I use cwRsync Server from _http://itefix.no/cwrsync_ on the windows
> server – which is a nice lightweight combination of an sshd and rsyncd
> for windows.
> So I do backup the windows server via rsyncd and call the
> predump/postdump scripts via ssh. But everything else should work just
> fine - ...
>
> My variation of the CreateShadow.cmd looks like this:
>
> *************
> REM --- Parameter %1 sourcevolume,
> REM --- Parameter %2 driveletter for shadowcopy,
> REM --- Adjust C:\Programme\cwRsyncServer throughout the script to a
> directory of your choice and copy this batch script and vshadow.exe in
> it.
>
> cd C:\Programme\cwRsyncServer
>
> setlocal
> if NOT "%CALLBACK_SCRIPT%"=="" goto :IS_CALLBACK
>
> set SOURCE_VOLUME=%1
> set DESTINATION_VOLUME=%2
>
> REM --- Call ntbackup to dump the systemstate on C: leave this out if
> you don't want it
> del C:\systemstate*.bkf
> ntbackup backup systemstate /J "Systemstatus" /F
> C:\systemstate_%date%.bkf
>
> 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%
>
> IF "%DESTINATION_VOLUME:~-1%"==":" SET
> DESTINATION_VOLUME=%DESTINATION_VOLUME:~0,-1%
>
> REM --- Write out a postdump script that removes the ShadowCopy
> @echo cd C:\Programme\cwRsyncServer >
> RemoveShadow_of_%DESTINATION_VOLUME%.cmd
> @echo VSHADOW.EXE -ds=%SHADOW_ID_1% >>
> RemoveShadow_of_%DESTINATION_VOLUME%.cmd
>
> ********
>
> I call this batch script form backuppc like this:
>
> # Pre & Post Dump Script
> $Conf{DumpPreUserCmd} = '$sshPath -q -x -l SvcwRsync $host
> /CreateShadow.cmd c: x: systemstate';
> $Conf{DumpPostUserCmd} = '$sshPath -q -x -l SvcwRsync $host
> /RemoveShadow_of_x.cmd';
>
> Make sure that your rsyncd.conf on the windows machine reflects the
> ‘swapping’ of the drive letters!
> In my example backuppc should dump x: therefore the rsync.conf looks like
>
> [cDrive]
> path = /cygdrive/x
> comment = Entire Drive
> exclude = "pagefile.sys" /cygdrive/x/System\ Volume\ Information/
> /cygdrive/x/System\ Volume\ Information/** /cygdrive/x/RECYCLER/
> /cygdrive/x/RECYCLER/**
>
> Now if you want to restore something – you must change this back to
>
> [cDrive]
> path = /cygdrive/c
>
> Or your restore will fail! – this can be easily done if you keep two
> rsyncd.conf files around and swap them depending on what you are doing
> (backup/restore).
>
> Keep in mind that ShadowCopies are not the magic answer for backing up
> open Databases !
> If you want to backup Exchange/SQL Databases this way be sure to read
> at least the comments on
> http://blogs.msdn.com/adioltean/archive/2005/01/20/357836.aspx
>
> Have fun !
>
>
> Dominik Hoffmann
> IT-Administrator
>
> -----------
> Ortszeit: Montag, 2. April 2007 20:03:30 (GMT+01:00) Amsterdam,
> Berlin, Bern, Rom, Stockholm, Wien
>
> wob AG
> Werner-Heisenberg-Strasse 6a-10
> 68519 Viernheim
> ICQ: 119783709
> http://www.wob.ag
> ------------------------------------------------------------------------
>
> Not spam
> Forget previous vote
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ------------------------------------------------------------------------
>
> _______________________________________________
> BackupPC-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/backuppc-users
> http://backuppc.sourceforge.net/
>
Cheers, Stephen
--
Stephen Joyce
Systems Administrator P A N I C
Physics & Astronomy Department Physics & Astronomy
University of North Carolina at Chapel Hill Network Infrastructure
voice: (919) 962-7214 and Computing
fax: (919) 962-0480 http://www.panic.unc.edu
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/