How to Schedule Windows Server Backup

If you are using Windows Server Backup to backup Exchange Server 2010 then you will want to configure a scheduled back task to automate the process.

Windows Server Backup has scheduling capabilities built in.  You can configure a scheduled backup job by clicking on Backup Schedule in the actions pane of the Windows Server Backup console.

Creating a scheduled backup in Windows Server Backup
Creating a scheduled backup in Windows Server Backup

However you might notice that the scheduling options are limited.  You can either perform a daily backup, or more frequent backups, but not less frequent backups.

Windows Server Backup scheduling options
Windows Server Backup scheduling options

Why would you want to create less frequent scheduled backups of an Exchange server?

Two example scenarios are:

  • Reducing backups to run weekly because the data is already protected by a Database Availability Group
  • Running two different backup jobs on alternating days that backup to two different devices or locations

Fortunately you can schedule your Windows Server Backup jobs to run any time you like simply by creating the jobs manually in Task Scheduler.

Launch Task Scheduler by searching for it in the Start Menu of the server you wish to back up.

Launch Task Scheduler
Launch Task Scheduler

In the Actions pane click on Create Task.

Create a new Scheduled Task
Create a new Scheduled Task

Give the new task a meaningful name, and then configure it to run whether the account is logged on or not.  This allows it to run completely unattended.

Configure the scheduled task security options
Configure the scheduled task security options

On the Triggers tab click on the New button.

Create a new trigger for the scheduled task
Create a new trigger for the scheduled task

The trigger for this task will be the schedule you want to run your backups on.  In this example the Exchange server will be backed up weekly on Saturdays.

Create a schedule for the backup job
Create a schedule for the backup job

On the Actions tab click the New button.

Create a new Action for the scheduled task
Create a new Action for the scheduled task

The action for this scheduled task will be to run wbadmin.exe, which is the command-line tool for managing Windows Server Backup.

The full command being configured for the scheduled task is:

wbadmin start backup -backupTarget:F: -include:D:,E: -allCritical -vssfull -quiet

This command line performs the following:

  • start backup – tells wbadmin.exe to start a backup
  • -backupTarget – this is the target volume to store the backup on, in this case F: (no trailing backslash)
  • -include – these are the volumes to include in the backup job, in this case D: and E: because they are the volumes with Exchange databases and transaction logs on them
  • -allCritical – this tells Windows Server Backup to also include any other volumes or data that are required for a full server recovery, eg the System volume and SystemState. This is optional if you only want to backup the Exchange data.
  • -vssfull - this tells Windows Server Backup to perform a full VSS backup of Exchange and truncate the transaction logs
  • -quiet – runs the command silently with no visual interaction
Configure the wbadmin.exe command line
Configure the wbadmin.exe command line

You can inspect the extra conditions and settings to see if you want to configure anything else for your environment.

The wbadmin command-line for the Exchange backup
The wbadmin command-line for the Exchange backup

Otherwise click OK.  You will be prompted for the password for the user account you configured to run the scheduled task (note: I recommend you use a proper service account for this and not the Administrator account).

Enter the credentials for the scheduled task
Enter the credentials for the scheduled task

The new scheduled backup job will now appear in Task Scheduler.

Exchange backup job in Task Scheduler
Exchange backup job in Task Scheduler

Task scheduler will also display the last run time and result for the scheduled task.

Comments

  1. Alfredo Pulido says

    Hi, I’m actually doing something similar, I have a similar instruction in a .bat file, so I do the same into an scheduled task, my problem is that when the scheduled task begins and execute the command it questions about formating the unit where backup will be stored, I mean, it doesn’t respect the parameter “-quiet”.
    Inclusive I’ve tried in CMD as administrator executing the same command and the result is the same.
    Any idea about how to make the command WBADMIN START BACKUP works without intervenction of the admin??

    Thank you I really appreciate the time you take helping others.

    Regards!

  2. Elio Frongia says

    I have a question. Will the backup delete the transactional logs? Will it commit all changes to the database? I created a different database for archiving, and it is stored in another volume also. If I backup that volumen, will it work the same way as backing up the Mailbox store? I think it will, as the ArchiveDB is, in fact, another mailbox store, right?
    This was very helpful for me.

    Thank you!

        • says

          Because the backup wizard is letting you choose files/folders if you so wish, which is valid for regular file server backups etc. But that isn’t the correct method for the application backup such as Exchange.

          But for Exchange the proper, supported backup for the Exchange application is to choose the volume.

  3. Brian says

    Will it work if I setup the backup on 2008 R2 and then go into Task Scheduler and edit the schedule? I have done this, and the next backup date is correct in Task Scheduler, but when I open Windows Backup gui, it still shows the next backup as tonight (not Monday as shows in TS).

    • Brian says

      Well, to answer my own question, it did in fact allow me to set up my backup with the wizard (gui) and then go back and change the schedule in Task Scheduler. In my case, I set the backup for 9pm which automatically runs daily, then changed it in Task Scheduler to weekly for every Monday, Tues, Wed, and Thurs. It works like a champ and on Fri, Sat or Sun, nothing runs or shows up as failed. The gui still will show it’s supposed to run on those days, but it never kicks off.

  4. says

    hi Paul,

    i am getting error while try to run command at PS. drive e: contains trans logs and drive f: contains exchang DB.
    i just want to take trans logs and db backup on weekly basis.

    wbadmin start backup -backupTarget:\\servername\sharefolder -include:e:,f: -vssfull -quiet

    Retrieving volume information…
    ERROR – The file ‘e: f:’ is invalid.

    thanks,

  5. Vicki C says

    I have this command working flawlessly in powershell:

    wbadmin start backup -backupTarget:\\nasbackup\backup\Tuesday1 -include:’e:,f:’ -quiet (which backs up my database and logs)

    But it won’t overwrite an existing backup when I run it in Task Scheduler.

    Can you tell me what I’m missing?

    Thanks,

  6. mak says

    you commands are incorrect, I just spent 2 hours figuring out the problem. The syntax is:

    start backup -backuptarget:d: -allcritical -vssfull -quiet

    Another advise is if you are Running this on demand, give it some time before panicking as it takes a few minutes depending on the size of your volume for the backup folder to showup in the directory.

    As someone rightly mentioned you can also create the normal scheduled backup using WSB and then modify the task under Task Scheduler>Task Scheduler library>Microsoft>Windows>Backup.

    Hope that helps someone out there.

    • Vicki C says

      Thanks, for your help, but that’s not quite what I was looking for.

      I don’t want to do -allcritical because that does almost the whole drive and I just want my database and log files backed up.

      The command I use works fine in powershell, just not in Task Scheduler.

      I need to make a new task for each day of the week, because we want daily backups Mon-Saturday and then a full backup will be done by WSB on Sunday. Each daily backup will be stored in a different folder.

      I wish WBS let you create multiple backups.

    • sohrab khaliq says

      thanku so much mak. i was badly try to search that how can we schedule weekly back up by task scheduler with out using wbadmin. As you told we can do it by task schedule . Task Scheduler>Task Scheduler library>MICROSOFT>Windows>Backup….
      Again thankx alot.
      Stay blessed.
      Regards:
      Sohrab khaliq
      Network Engineer.
      UAE Custom Department

  7. David Tabib says

    Hi Paul,

    I have been using your procedure for more than a year and I it has been working fine for me but last night backup failed. I received the event ID 565 that “The consistency check for the component ‘ed1d6b6e-54b9-4050-9275-ba1bbada42a7’\’Microsoft Exchange Server\Microsoft Information Store\XXX’ has failed.”

    And:

    Exchange VSS Writer (instance 62ed04fb-62ed-490a-9c9e-18ca1a571858:10) has completed the backup of database ‘Mailbox Database 2096781375′ with errors. The backup did not complete successfully, and no log files were truncated for this database. Event ID 9782.

    This error happens on 4 other databases that is part of the DAG.

    So,

    I ran the following commands all the DAG members to check the health state of the contentindex:
    Get-MailboxDatabaseCopyStatus | fl name, contentindexstate

    All the contentindexstate were healthy on all servers.

    I am not sure what I do at this point. What should I check for.

  8. DJ says

    for me this a much easier/simpler way to schedule a windows backup job.

    Just make the job with the Windows Backup Gui, weekly/monthly is no option there.

    But once the job is made in the Windows backup gui, open Task scheduler >> Microsoft >> Windows >> Backup and edit the schedule there with a lot of options…..

    • SOHRAB KHALIQ says

      Hi,
      First of all thank you very much for all who tries their efforts to solve the queries of others. I need an urgent solution please. i will be thank full. I want to configure more then one back up schedule jobs weekly. i can configure one weekly job easily by task scheduler. But when i try to schedule 2nd job it modifies the first one instead of creating 2nd one.But i want to configure more then one weekely jobs, And i do not want to use command in command line. i mean by wbadmin. Can any one tell me the solution via task scheduler. I read on many forums but i did not find the solution for it. I am badly stuck for this. I will be much thank full for help.
      Again thankx alot for this forum because this is very very informative.
      Stay blessed.

Leave a Reply

Your email address will not be published. Required fields are marked *