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.

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Comments

  1. SusanL

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

    You are kidding, right? Because countless people backup things *OTHER* than just Exchange Server.
    Duh.

  2. Anish Kumar

    Hi Paul,

    I am facing a issues during my regular schedule backup. Error : ‘there was a failure in creating a directory on the backup storage’.

    Total Backup size 340 GB and remaining space on the Drive is 163 GB.

    To start the next schedule backup is that we should have addition 340 GB of free space?

    Please advice.

  3. Nélio Abreu

    Hi Paul,
    I have a question.
    Is it possible to create incremental backups or changed files through command line and Schedule Task?
    Lets say I do a full backup once, and remain backups will be incremental or changed files only, all this through command line and Schedule Tasks
    How do I accomplish this in command line? Which parameters do I use for each backup?
    Best Regards,
    NA

  4. DH

    Hello Paul. I’d raise a question in technet but I think an answer from an expert such as you is better.

    1. The backup size of VSS full backup will be the size of that volume? Or the size of files inside that volume? E.g. D: total volume is 2TB. Database (.edb) and transaction logs files are 50GB. What will be the final backup size?

    2. You said “Windows Server Backup will automatically remove old backups to make room for new ones”. Is that include backup to a shared network folder?

    1. Avatar photo
  5. Sammeta Yugandhar

    hi Everyone,

    see i had scheduled 3 backup’s,in which one will happen daily at 2:00 AM and the remaining 2 happens on weekly i.e. 1 on Saturday 2:00 PM and other on Sunday 2:00 PM.i was facing a issue about recover, after completing 30 back ups it shows only last 5 copies of back .
    Here is my requirement i need 30 to 60 days copies i.e around 40-80 copies i require.i would like to know the changes to be done where?

      1. Sammeta Yugandhar

        i had attached 2 TB External USB Drive in which only 800 GB used till now remaining as empty space.

        i had small doubt after installing Microsoft or windows updates on server it may erase the back up copies?

  6. fish72

    I wrote a simple batch file that copies the daily backup once a week (Friday in my case), And added it to the task scheduler to run once a week. You can create a different backup (Daily/Weekly/Monthly) to suit your needs.
    Example of my batch file :

    rd f:weekly_friday

    robocopy /e f:windowsimagebackup f:weekly_friday

  7. shahin

    hello
    i want to Backup “SystemState” file of schedule
    using Task scheduler how to process ???????

  8. namdev

    i have scheduled backup in windows server, it creates only 0 bytes file not taking complete backup.

    but i run script manually to double clicking on batch script then it take complete backup.

    Please suggest me whe re is mistakes in task schedules.

    1. Avatar photo

      Check the security options of your scheduled task. You may not have specified an account that has the necessary permissions.

      Or just set up the scheduled backup within Windows Server Backup itself, if you only need it to run once per day.

  9. Aslam

    the operation to backup the volume was stopped before it started running
    please help me…………

  10. DJ

    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…..

    1. SOHRAB KHALIQ

      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.

  11. David Tabib

    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 ServerMicrosoft Information StoreXXX’ 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.

  12. mak

    Not sure why it wasnt working on server 2008, but the same commands work ok 🙁

  13. mak

    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.

    1. Vicki C

      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.

    2. sohrab khaliq

      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

  14. Vicki C

    I have this command working flawlessly in powershell:

    wbadmin start backup -backupTarget:\nasbackupbackupTuesday1 -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,

  15. Manish Kataria

    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:\servernamesharefolder -include:e:,f: -vssfull -quiet

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

    thanks,

    1. Manish Kataria

      just got the answer: use “-include:e:,f:” if you are running in PS or use above mentioned command if you are using cmd prompt.

  16. Mohammed Maulana

    Thank you very much Paul for this amazing article. I always find what I require on your blog. You are doing good job.

  17. Brian

    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).

    1. Brian

      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.

  18. Karan

    Hi Can we select particular folders in a drive for weekly scheduled backups

      1. Karan

        Then how is scheduled backup wizard giving an option to do so when you go for custom backup

        1. Avatar photo

          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.

  19. Elio Frongia

    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!

      1. Elio Frongia

        Thank you very much. It worked as expected!

  20. Alfredo Pulido

    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!

  21. Sebastian

    That’s what I was looking for. Thank you!

Leave a Reply