Backing up SBS 2008 and Server 2008 to Network Share

Source: http://www.wbadmin.info/articles/scheduled-backups-nas-windows-server-2008-backup.html

Method 1 – scripting “wbadmin.exe”

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

 

System state:

You create a batch file and use this command line :

wbadmin start systemstatebackup –backupTarget:e: (-quiet)

You must change the target

If you want to see jobs running :

wbadmin get status

This example shows you how to backup C:, D: and E: drives – 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.

When you have finished and are satisfied that your batch script runs properly, then you can schedule it using the Windows Task Scheduler. (Start menu > Administrative Tools > Task Scheduler).  Follow the wizard to set up your batch file to run at the desired time every day. In the final step of the wizard, click the checkbox to Open the Properties dialog for this task when I click Finish.

Now, on the General tab of the task’s Properties dialog, select Run whether the user is logged on or not, and check the Run with highest privileges checkbox. Also ensure that the user that the task is running as is an Administrator or part of the Administrators or Domain Admins group.

Note: If you do not follow these last steps, your backup will not run properly.

Leave a comment