Wednesday, November 02, 2011

Backup and restore With WBAdmin

To script the backups, you'll need to create a batch file and use the wbadmin start backup command. For a list of the options you can use with wbadmin, you can go to the command prompt and type in, "wbadmin start backup -help".

A sample command you'll use will be:

wbadmin start backup -include:c:,d:,e: -backupTarget:\\SERVER\SHARE -quiet

wbadmin start systemstatebackup -backupTarget:\\share\share:

This example shows you how to backup C:, D: and E: drives and backup systemstate - but of course, you should customize this parameter to suit your system.

Optionally, you can use the -user and -password options to explicitly specify the username and password to use when connecting to the share.

Save this batch file to disk - for example, C:\Users\Administrator\Desktop\RunBackup.bat

Note: you should run the file interactively from the command prompt so that you can test running your script before scheduling it.

To perform a system state recovery of the backup from 04/30/2005 at 9:00 A.M. that is stored on the shared resource \\servername\share for server01, type:

wbadmin start systemstaterecovery -version:04/30/2005-09:00 -backupTarget:\\servername\share -machine:server01

No comments: