WBAdmin | Daily Backup and Restore via Schedule

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /homepages/40/d806441738/htdocs/clickandbuilds/edwardsd/work/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /homepages/40/d806441738/htdocs/clickandbuilds/edwardsd/work/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

I’ve been working with the windows backup. One downside of this in Windows 2008 is that you can’t schedule a routine backup job to a network device. A work around is use a scheduled task and the WBAdmin tool.

Scheduled Task: (Create a scheduled task and us the following switches)

wbadmin start backup -backuptarget:\\server\backup$\ -vssFull -allCritical -quiet

This command will backup the entire drive including a system image. I don’t think the “allcritical” will work if you then specify items to exclude.

Show Backups Running:

Wbadmin get status

Full list of switches: cc742083

Windows Backup email notification when complete:

To improving this backup job I also created a scheduled task to email notification that the job is complete.

  1. Create new “Basic Scheduled Task”
  2. Name: Windows Backup Notification | Description:  Will send email notification when the windows backup is complete.
  3. Trigger: When a specific event is logged
  4. Log: Microsoft Windows Backup Operation | Source: Backup | EventID: 4
  5. Send an Email

From: backup@mydomain.com
To: alerts@mydomain.com
Subject: Backup Notification Complete – Windows Server Backup on Server-DC1
This is an action Notification. Windows Backup is complete on Server-DC1 – EventID4
SMTP: mail.mydomain.com
Change: “Run whether user is logged in or not”

4 thoughts on “WBAdmin | Daily Backup and Restore via Schedule

  1. Alain Spineux

    Do you know MKSBackup ?
    Setup what and where to backup in a .ini file, and MKSBackup will run wbadmin and send a very easy to read but complete mail report including the log and therelated eventLog event.

    At installation time, MKSBackup can create the task int he task scheduler for you.

    The target can be defined by MACRO using the date and time to balance backup between multiple locations.

  2. Dom Post author

    I will have to a take a look at the tool and see how I get on with it!
    Thanks for the info!


    I’ve created the Basic Scheduled Task to send email after log id 4 on windows backup.
    The backup is also scheduled as a task using WBADMIN.
    The backup runs scessufuly but never receive the email. What can be wrong?

  4. Dom Post author

    First thing I would check is if there actually is the event being generated in the eventlog. You should be able to see this here:
    Eventviewer -> Application and Service Logs -> Microsoft -> Windows -> Backup -> Operational.
    Event ID4: “The backup operation has finished successfully”

    How have you configured the SMTP settings? For my situation the SMTP server is hosted internally therefore am easily able to point to this server address/name (i.e. smtp.domain.com) which will resolve the local IP of the server. If your email provider is hosted externally you may need to confirm that it allows mail to relay (with auth). Unfortunately there are not a lot of configuration options available for SMTP authentication settings.

    The method I posted isn’t particular effective as it doesn’t notify you if the backup fails however at least it provides some information to show the task is running for customers/end users.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.