ASR Backups are a cool way to get system state backups of Windows 2003 server. They are cooler than regular NTBackup system state backups, because you can do a “bare metal” restore by booting a system with no OS to the installation CD and providing the ASR disk and path to backup files (USB drive, locally installed disk, etc.).
People that have used ASR backups sporadically might be surprised to learn that yes, it is possible to automate ASR Backups. It’s not really documented, but NTBackup.exe accepts a parameter called “asrbackup”. Now you might be saying – well I don’t really want to leave a floppy disk in the drive all the time, and I don’t want to be swapping floppy disks every backup or maybe I have machines without floppy drives. Well, I hear you! But have you ever heard of Virtual Floppy for Windows? It basically lets you create a virtual floppy drive and script the insertion and removal of virtual floppies which are like tiny little .iso files.
Here how I did it:
- Download and unzip Virtual Floppy for Windows
- Write yourself a batch file that looks something like this:
REM Get the date for the file using the wonderful :~ trick — thanks to Terry Uptmor for that trick
set MYDATE=
set MYYEAR=
set MYMONTH=
set MYDAY=
set FILENAME=
set MYDATE=%DATE%
set MYYEAR=%MYDATE:~10,4%
set MYMONTH=%MYDATE:~4,2%
set MYDAY=%MYDATE:~7,2%
REM create a variable for your filename – might as well include the computer name
set FILENAME=ASR_%COMPUTERNAME%_%MYYEAR%%MYMONTH%%MYDAY%
REM might as well do some BASIC logging
Echo starting ASR Backup at %TIME% %DATE% >> backup.log
REM refer to the vfdhelp.txt for info on these commands
vfd.exe INSTALL
vfd.exe START
vfd.exe LINK A:
vfd.exe OPEN A: c:scripts%FILENAME%.vfd /NEW /F
REM The mysteriously undocumented asrbackup command in action (/F just specifies your filename)
ntbackup asrbackup /F “%FILENAME%.bkf”
vfd.exe SAVE
vfd.exe ULINK
vfd.exe STOP
vfd.exe REMOVE
So now you would have a .VFD file and and .BKF. (You would probably want to also run a data backup around this time, also I’m not sure if ASR will backup non-system files on the system volume so a separate full system volume backup wouldn’t hurt).
If your server crashed, you could just load up the VFD file on your laptop (which is all prepped with VFD.exe and ready to go of course 🙂 to a virtual B: drive and use windows explorer to do a “copy disk” over to a physical floppy (using your handy USB floppy drive), plug a large usb drive with the bkf files on it to the new server, boot to the 2003 install disk, select ASR option, yadda yadda yadda.