For more than a decade now, NTBackup has been the primary backup solution included with Windows operating systems. When Microsoft created Windows Vista and Windows Server 2008, it finally retired NTBackup and replaced it with a new backup utility, known in Windows 2008 as Windows Server Backup.
As you might have noticed, Windows Server 2008 was designed to let you do just about anything from the command line that you can do through a GUI, and backing up the server is no exception. Microsoft allows you to perform Windows Server Backup operations by using the WBAdmin command.
What to keep in mind about WBAdmin
Before I get started, there are a couple of things I want to mention. First, if you have grown attached to NTBackup, then you need to know that NTBackup is not compatible with Windows Server 2008. However, if you have backups that were made using NTBackup, and you need to restore them, you can download a read-only version of NTBackup that will allow you to restore your backups.
I also want to point out that Microsoft includes the WBAdmin command with Windows Vista. Having said that, there are a number of WBAdmin functions that have been disabled in Vista, so the only way to get full WBAdmin functionality is to use the Windows Server 2008 version.
Backing up your server with WBAdmin commands
On Microsoft's website you can find a list of valid WBAdmin commands, which are the same commands that you see if you open a Command Prompt window and enter WBAdmin /?. I recommend checking out the website at least once, though, because it tells you which commands will and won't work with Windows Vista.
When you look at the list of WBAdmin commands shown in Figure A, it initially appears that WBAdmin is not a full-fledged replacement for Windows Server Backup. After all, the list shows that WBAdmin only supports 12 commands.
But you have to realize that each of these commands contains multiple sub-commands that allow you to perform pretty much any backup task you could perform through the GUI.
Unfortunately, I can't possibly cover all 12 commands and their various sub-commands within the confines of a single article. What I can do is point you in the right direction by demonstrating how to use WBAdmin to create a backup.
The primary command for setting up a backup is the WBAdmin Enable Backup command. There are several different parameters you can include with this command:
- –AddTarget: This allows you to specify the location where backups should be written to. You can use a disk identifier for this operation, but keep in mind that if you tell WBAdmin to write the backup to a disk, then the disk will be formatted and any existing data will be lost.
- –RemoveTarget: This parameter allows you to disassociate a backup target from the scheduled backup if you have an existing backup schedule in place. You can then specify a different target using the –AddTarget command.
- –Schedule: This lets you to tell Windows when the backup should run. Times must be entered in HH:MM format. You can schedule multiple times, but those times must be comma delimited.
- –Include: Here you have the option of specifying the items that should be included in
your scheduled backup. You can include a comma delimited list of volumes, volume mount points or
GUID-based volume names.
If you choose to use the –Include parameter, then you also have the option of using the –AllCritical parameter. This tells Windows to include any volumes containing operating system components.
- –Quiet: This parameter tells WBAdmin to run the backup without prompting the administrator.
The WBAdmin Enable Backup command is great for creating scheduled backups, but when you want to run an unscheduled backup, enter the WBAdmin Start Backup command. WBAdmin will then look for any scheduled backup jobs, and use the settings from the scheduled backup. If you don't want to use those settings, you can enter a separate set of parameters to directly control what is being backed up.
Many of these parameters are identical to the ones used with the WBAdmin Enable Backup command, but there are a few additional parameters you can use to set authentication credentials, control verification and a few miscellaneous things like that.
If you want to see all of the additional parameters that go along with the WBAdmin Start Backup command, simply enter WBAdmin Start Backup /? at the command prompt. And use this same technique to figure out which parameters are available for the other WBAdmin commands.
ABOUT THE AUTHOR
Brien M. Posey, MCSE, has received Microsoft's Most Valuable Professional Award four times for his work with Windows Server, IIS and Exchange Server. He has served as CIO for a nationwide chain of hospitals and healthcare facilities, and was once a network administrator for Fort Knox. You can visit his personal Web site at www.brienposey.com.
This was first published in January 2009