Wednesday, April 14, 2010

Using wbadmin to exclude C:\ from 2008 Server Backups

So, the 2008 Server backup utility is pretty spartan. TROG MAKE BACKUP, without a lot of flexibility. We back up IIS configs and content only, don't care about the system drive....but TROG will not permit this. When things go bad on an IIS box, we're just going to restore the configs and content....on a new IIS box that's not busted.

In the meantime, we don't want to waste drive life backing up a whole system partion every night, and bandwidth shuttling it to our backup server for the Iron Mountain guy to come pick up on Mondays. Waste-of-time.

So, here's how to backup just what you want, and nothing more, on your 2K8 Server R2 box:

1. Make sure the Windows 2008 Server Backup Command Line Tools are installed. Server Manager>Features Summary>Add Features


2. Test your backup syntax using wbadmin start backup. Open a command prompt and do a test backup using text similar to my example below. Say I want to backup the IIS content on the D:\ drive only, and I want it to go to my NAS so we can ship it to our backup server later. (commands are all one line, not two as shown) . Once you've gotten the syntax correct, and your backup runs...go on to step 3.

For my example, I would use:

wbadmin start backup -include:d:
-backupTarget:\\wdsharespace\PRDBKPIIS


You would use:

wbadmin start backup -include:
-backupTarget:


3. After you've fiddled with wbadmin syntax and get it where you want for your situation, make a scheduled task for it. Note that it keeps a little one-time logfile in C:\IIScontentbkp.txt

Program/Script: C:\Windows\System32\cmd.exe

Add arguments: /k "wbadmin start backup -include: -backupTarget: -quiet > C:\IIScontentbkp.txt"

Start in: C:\Windows\System32\



4. Enjoy! It's helpful to note that wbadmin creates backups as Virtual Hard Drive (VHD) files. So, it gives you some flexibility for recovery in that (with W7 or 2K8R2) you can mount a VHD file and drag and drop to put your files back if you don't want to do (or don't trust wbadmin recovery)

No comments:

Post a Comment