In this article we’ll look at how to use Windows Server Backup on Windows Server 2012 to backup the databases on an Exchange Server 2013 Mailbox server.

For this demonstration a standalone Mailbox server (one that is not a member of a database availability group) hosts a single mailbox database.

[PS] C:\>Get-MailboxDatabase -Server E15MB3

Name                           Server          Recovery        ReplicationType
----                           ------          --------        ---------------
Mailbox Database 3             E15MB3          False           None

Installing Windows Server Backup

Before we can back up the database of course we need to install Windows Server Backup. You can install this using PowerShell.

PS C:\> Install-WindowsFeature Windows-Server-Backup

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    No             Success        {Windows Server Backup}

Configuring a Scheduled Backup

The next step is to configure a scheduled backup job. Open Windows Server Backup on the server.

 

exchange-2013-database-backup-01

In the Local Backup area of the console launch the Backup Schedule… wizard.

exchange-2013-database-backup-02

Click Next to move to the backup configuration selection. A full server backup is recommended, but if for some reason you only want to back up the Exchange database you can choose Custom instead.

exchange-2013-database-backup-03

If you’ve chosen a custom configuration you will then need to click Add Items and add the volumes that contain the Exchange mailbox database and log files. If you have chosen Full Server then this step will not be required.

exchange-2013-database-backup-04

Next, click Advanced Settings and on the VSS Settings tab make sure VSS full backup is chosen. If you have chosen a Full Server backup then this step will not be required.

exchange-2013-database-backup-05

Continue through the wizard and choose a backup schedule, either once per day or multiple times per day.

exchange-2013-database-backup-06

Choose the backup destination. For this demonstration I’m using the recommended method of a local hard disk that is dedicated for backups.

exchange-2013-database-backup-07

You may need to click Show All Available Disks if you do not immediately see the disk you wish to use as a backup destination.

exchange-2013-database-backup-10

The disk will be reformatted for use by Windows Server Backup, which will erase any previous data stored on it.

exchange-2013-database-backup-11

Review your selections and click Finish to create the scheduled backup job.

exchange-2013-database-backup-12

Manually Running a Backup

You can manually run a backup by launching the Backup Once… wizard.

exchange-2013-database-backup-13

This gives you the choice of using the same settings that are configured for the scheduled backup job, or running through the same wizard shown above to choose settings for a one-off backup job.

Checking Backup Status

The status of backup jobs is reported in the Windows Server Backup console.

exchange-2013-database-backup-14

You can also check the last backup time stamp on the mailbox database itself.

[PS] C:\>Get-MailboxDatabase -Server E15MB3 -Status | fl name,last*backup

Name                   : Mailbox Database 3
LastFullBackup         : 11/18/2013 10:51:41 PM
LastIncrementalBackup  :
LastDifferentialBackup :
LastCopyBackup         :

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

    Hi I watched your video – Exchange 2013 Boot Camp – Module 3 Lesson 3 Restore Database from Backup. In that tutorial you make a full backup of the exchange server (both database and log files).

    When you are trying to recover a database in WSB, we select “Recovery type – Exchange” then “Select application to recover – Exchange”. I want to ask how would exchange know if you want to recover databases or log files? From what I described earlier, Exchange attempts to recover the databases. How can I recover the log files from a full backup?

    Thanks.

  2. SYMPAT

    Hello my exchange server 2013 crached, (I mean Exchange is not starting any more).

    I copied DBs folder and past it in an new virtual sever.
    I Installed a new exchange in the new server (it’s ok, I mean it syncronized with my ADDS)

    I used Win serv Backup to recover database files in the Mailbox folder.
    the exchange management consol can see my recovered DBs.
    I mounted in succesfuly.

    The ISSUE is that I dont know how to link users to their mailboxes.

    Help please.

    God Says “my people is dying because of lake of knowledge” some hting like that…….

    1. Avatar photo
      Paul Cunningham

      Sounds like you’ve used database portability to recover the databases on a new server that has a different name. You can find a TechNet article on how to complete that process, or if you’re stuck and this is an outage for your users I recommend you open a support case with Microsoft so that they can give you the correct guidance.

  3. Jason Ramsden

    Hi Paul,

    I have a 2012 Host (not R2) that has a dedicated guest VM for Exchange 2013. The Windows Server Backup is on the host and runs fine but will not truncate the VM Exchange logs. I’ve changed the backup to exclude the System State and Bare Metal but nothing.

    Is this possible from the Windows Server Backup, or should I do something different. I was thinking of backing up from within the VM to a n attached Virtual Disk just to truncate the logs.

    Any suggestions please?

    Jas

  4. Brandon

    I should clarify that the replication is of the full server as it is a VM in hyper V

  5. Brandon

    Hello Paul, I have a single Exchange 2013 server being replicated to a secondary location. Will this satisfy the VSSFull requirement or will a WSB still need to occour to ensure the logs are truncated. If not, what are the implications of settings the WSB performance configuration to “Faster backup performance” rather than the standard “Normal backup performance”. I’ve read over the page ” https://msdn.microsoft.com/en-us/library/dd759145(v=ws.11).aspx ” however it doesn’t provide the clarity im looking for.

    1. Avatar photo
      Paul Cunningham

      VM replication isn’t a backup, and won’t truncate logs. It’s also quite unsuitable for a range of data recovery scenarios. Aside from that VM replication is not supported for Exchange servers. Exchange has DAGs for DR purposes, and you should use that instead.

  6. DH

    Hello Paul, is DH again. Found someone said backup of passive database is possible with document prove at – https://social.technet.microsoft.com/Forums/en-US/61ad3ae7-3e1f-47b6-a257-94d7425d6030/backup-of-passive-database-copies?forum=exchangesvrgeneral

    My boss think backup the active database may cause impact (such as system slow down , sort of…). So, insist only backup the passive one.

    Is there any different (especially when need restore) between backup the active copy and the passive copy database?

  7. DH

    Hello Paul. By reading through all the reply. I realize that backup/restore the database of the passive server may cause unexpected behavior. And you said the application restore perspective only sees the active database copies on the volume.
    Is that mean backup the passive server database is useless? If that’s true, backup the transaction logs in passive server also not necessary too?

    1. Avatar photo
      Paul Cunningham

      What’s required, and supported, is to back up the active database copy. That will trigger log truncation, and that is what is supported for recovery.

      The question is, which db copy is active at the time of the backup? In a neatly controlled environment you’ll expect that specific copies will be active. But what if there’s been a fault and the db activated on a different server? What if some copies on a volume are active and some are passive (note: multiple databases per volume is recommended, but complicates Windows Server Backup restores). To account for that you would backup every volume with every copy regardless of whether it’s active or passive.

      The passive copies aren’t entirely useless. You can mount them in a recovery database if necessary. But you shouldn’t rely on them, you should still take backups of the active copy.

  8. Brian Horton

    Paul,

    You’re a patient and kind person to respond to all of these requests. Thank You.

  9. Jason

    Hi Paul,

    I have ran a full backup as recommended to truncate the log files on our exchange 2013 server which was successful, but as our logs are increasing slowly again I thought I’d best take regular backups to truncate them, but the issue is if I keep on taking backups I’m going to run out of storage to keep all the backups on, my question is do I need to keep all the full backups of I need to restore in future because they will all individually have all the complete sets of log files in each one, or is it safe to say delete the first full backup I took after another has been backed up and created?

    I appreciate any information in this matter.

    Many Thanks,

    Jason

    1. Avatar photo
      Paul Cunningham

      A full backup can be used to restore the database. You can keep as many full backups as your data retention requirements deem necessary.

  10. Joe Torres

    Hi Paul, I’m unsure if this is the right blog where I should post my question but here it goes.

    I’ve been reading up on what type of method WSB uses to take the backup of exchange; clone snapshot shadow copy, or a snapshot shadow copy. Taking a look at this Exchange Team Blog: https://blogs.technet.microsoft.com/exchange/2012/06/04/everything-you-need-to-know-about-exchange-backups-part-1/ it only describes the COW (Shadow Snapshot) method which makes me think that this is the way that it’s done however I can’t find documentation which backs this up.

    Can you please confirm if a COW is the method used when WSB is used to back up an EDB.

    BR Joe Torres

  11. Jason

    Hi Paul,

    I have ran a full backup as recommended to truncate the log files on our exchange 2013 server which was successful, but as our logs are increasing slowly again I thought I’d best take regular backups to truncate them, but the issue is if I keep on taking backups I’m going to run out of storage to keep all the backups on, my question is do I need to keep all the full backups of I need to restore in future because they will all individually have all the complete sets of log files in each one, or is it safe to say delete the first full backup I took after another has been backed up and created?

    I appreciate any information in this matter.

    Many Thanks,

    Jason.

  12. mir mohammed ali

    Dear,
    i am taking vss full backup but the problem is logs are not deleting.please help me.

  13. John

    Hi Paul,
    I have two Exchange 2013 running on win2k12 r2(DAG Member). I use WSB on one of them to backup the exchange server. The backup is successful, logs are being truncated on both server, etc.

    The only problem is that, after each successful backup the mailbox databases fail over, for Example db1EX1 move to another DAG member automatically. I have 10 mailbox databases.

    Usually, I keep the Active copies on the primary server and backing up the passive copies.

    Any help would be much appreciated

    1. Avatar photo
      Paul Cunningham

      If you’re using WSB you need to back up the active database copy.

      1. John

        The same thing happens when i backup the active copies. The databases randomly fail over during the application exchange consistency check(WSB). I can simply ignore it, if this is normal. I just don’t want to run into any problem.

        1. Avatar photo
          Paul Cunningham

          It’s not normal for database failovers to be triggered by backups.

  14. Chris

    Hi, thanks for the article, any ideas on my problem?

    I have a lab environment, 3 dag members, 6 databases, 2x active and 2x passive on each dag – logs and data on dedicated M: drive, same folder

    Using WSB to backup M: on each dag member, it backs up ok and if inspect the files/folders using recover it contains active and passive on each dag member, I can restore and mount any of these to a recovery db but have to use eseutil /p

    The quirk… If I do an application restore, it only restores MDB03 on the dag members which have active or passive copies, I don’t get any other MDBs even though the files are in the restore. And on the dag member without MDB03, I only get files/folder option, no application restore option

    Weird?

    Exch2013,CU11 on Win2k8r2

    1. Avatar photo
      Paul Cunningham

      That sounds normal to me. WSB backups up everything on the volume, but from an application backup/restore perspective only sees the active database copies on the volume.

  15. alex

    I have a challenge i am not finding any solutions to this problem
    I am trying to backup the passive copy of a 2 member dag spread across sites using NT backup
    every time i run the backup i get

    “The backup operation that started at ‘β€Ž2016β€Ž-β€Ž01β€Ž-β€Ž13T17:27:22.514265200Z’ has failed with following error code ‘0x807800C5’ (There was a failure in preparing the backup image of one of the volumes in the backup set.). Please review the event details for a solution, and then rerun the backup operation once the issue is resolved.”

    any ideas on the solution to this one

  16. Fred

    In a two server DAG should the EnableVSSWriter be diabled?
    Both server are Windows Server 2012 not R2 and the backup are successful. But the databases are not reporting as being backed up.

    1. Fred

      Forgot to that I’m using Windows Server Backup. Installed on the primary server.

  17. Samy

    Hello,
    I just wanted to confirm if I backup only log folder using WSB, will these truncate the logs automatically ?

    Please advise

    Thanks

  18. Kuby

    Hi, thank for this article.

    Master, our plan is to convert our physical 2013 exchange server to a Hyper-V Guest.

    Can I disconnect the physical exchange server, do a windows full back up to an external disk, create a hyper-v machine with the same server name, and restore full backup to this hyper-V machine?

    Thanks in advance!
    Kuby

    1. Avatar photo
      Paul Cunningham

      That is a disruptive approach that would involve a lot of risk and downtime.

      I would recommend you install a new server with a new name as the Hyper-V guest, install Exchange, and migrate services and mailboxes across to it over a period of a few days.

  19. Erik

    According this technet article https://technet.microsoft.com/en-us/library/dd876851%28v=exchg.150%29.aspx the Exchange log files will NOT be truncated if you do full server backup. It is outlined in the table at the bottom of the mentioned page.

    And to be sure I also tested this and from that experience I can say that a full server backup does indeed NOT truncate the log files of exchange and a custom backup selecting all the volumes DOES truncate the log files. Maybe an idea to include this in your article?

  20. Paul M

    The reason log files aren’t cleared in the cases listed above is that if you choose “Full Server (recommended)” backup it actually does a VSS copy backup. As it says in the option description “This option retains the application log files”.

    To force Windows Server Backup to clear the log files follow Paul’s instructions in this email and choose Custom. Then select VSS full Backup in the Advanced Settings -> VSS tab. To quote the option description again “This option updates the backup history of each file and clears the application log files.” Also ensure you add the VOLUME Exchange is running on otherwise you wont get a VSS application aware backup. In fact, since you were going to do a full backup anyway just add everything πŸ™‚

  21. Muthusamy

    Hi,

    We have an exchange 2013 sp1 infra as below

    OS-Windows 2012 R2
    Ex- Exchange 2013 SP1 ( 2 node DAG) Each server have 2 active and 2 passive databases

    Can you please tell me how to use WSB in the above scenario to

    Thanks in advance.

    Regards,
    Muthu

  22. JoΓ£o Oliveira

    Hi Paul. I have a problem with the full backups of my single exchange 2013 server. When the backup starts, some minutes later, asp.net warnings show up in the event log, aside from asp.net warnigs i get some errors to in the event log. This happens for about one hour ( the backup takes two hours to complete). As soon as the backup ends, the warnings and errors in the event log stop.

    Can you help me with this? The server have has exchange 2013 Cumulative Update 2.

    Thanks

  23. Patrick vd Berg

    Microsoft Exchange Writer is responsable for the exchange 2013 backup, what we did was remove some old log files , stops the IIS service and restarts it. we also put on the enable Circular logging .

    1. Avatar photo
      Paul Cunningham

      IIS logs are not the same as the Exchange database transaction logs. Turning on circular logging won’t help with IIS logs.

      IIS logs aren’t removed by backups, you need to manually remove them or run a script to remove them regularly.

  24. Robert McCown

    I am having the same issue. WSB is successful however, logs are not cleared. I have 3 servers in my DAG. Backups work on 1 of the servers. the only difference I see for the one that does not work is it does not have the following writer:
    Writer name: ‘Microsoft Exchange Writer’
    any advice?
    I am looking at an article that explains how to register the vss writers, but not sure that is the right approach.

  25. Patrick vd Berg

    Exchange transaction logs, only some logs from 2 years and older was removed.

    folder was d:exchange Mailboxlog

    1. Avatar photo
      Paul Cunningham

      2 years and older? That suggests you haven’t had a successful backup in several years. Are you sure that is the folder that the database is currently using for transaction logs?

      1. Patrick vd Berg

        yes, i just started here as ICT guy, so there wasn,t made any backups before ..))

  26. Patrick vd Berg

    Hi Paul i did , but my boss come to my desk, he said just delete some old log files ( i warned him, that everybody says not to do , but he did ) after that he restarted the exchange IIS services, and everything is running fine ..(((

    grrrr, after the service restart the log files where cleaned…

    thanks for the support Paul

    1. Avatar photo
      Paul Cunningham

      Which logs were deleted, IIS logs or Exchange transaction logs? What was the folder where they were deleted from?

  27. Patrick vd Berg

    Hi Paul,

    i used the windows server backup, i did a complete backup ( no errors ! )
    but the exchange Mailboxlog directory is still full with log files ( 900gb !! )
    i,m running out of space ( still 70gb left from 1tb ) so i,m starting to get a bit nervous now ..))

    1. Avatar photo
      Paul Cunningham

      The most likely cause is that you did not set the backup type to “VSS Full Backup”.

  28. Patrick vd Berg

    Hi, we have exchange 2013, and our database is located at the d: drive , where also the log directory is located.

    i did a full backup, wich had succeeded, but the log directory is still full ( almost 900gb )

    what did i wrong ??

    greetings, Patrick
    Holland

  29. Elias

    What is the procedure when Exchange server 2013 is a member of DAG? It’s really important for me to know the procedure as I have 3 member DAG.

  30. Elias

    What is the procedure when Exchange server 2013 is a member of DAG? It’s really important for me.

  31. Jason

    Paul, what if you have multiple DBs on your standalone Exchange server? Should each DB be on its own volume? My concern is beating up the back-end disk infrastructure. Will WSB even support Exchange backups if the DBs are on different volumes?

    1. Avatar photo
      Paul Cunningham

      Yes it is supported. The caveat is that when restoring *all* backed up data is restored together, you can’t choose a single database to restore from a backup set.

      1. Jason

        Paul, so back to my initial question. Since we want to stagger the backups of each DB, should we put each DB on its own volume? We want to avoid backing up the entire volume at once since the SAN is hit so hard. If what I am suggesting is possible, this means we should be able to individually restore each DB, also, correct?

        1. Avatar photo
          Paul Cunningham

          Yes, since you can only backup an entire volume you would need to put DBs on different volumes to back them up as separate backup jobs.

        2. Jason

          Thanks. I expected that to be the answer, but I cannot find a blog or TechNet article anywhere that states WSB works like that in regards to Exchange. I see a lot like this where there is talk of a single DB, but that’s it. Granted, most orgs don’t use WSB and I know it is designed for the budget-conscious org, but there are some medium-sized businesses that do still use it, it seems.

        3. Avatar photo
          Paul Cunningham

          Sure. It works fine and is supported but has those caveats. Microsoft could probably document more complex Exchange 2013 with WSB backup scenarios, but they’d probably prefer you look at a backup product that handles more complex requirements more easily.

  32. Tim

    Hey, how about backup cleanup? I want to set up a maintenance job to keep only 60 latest backups.
    Is that possible?

    1. Avatar photo
      Paul Cunningham

      Windows Server Backup will self-manage the backup retention based on available capacity of the backup destination.

      Other backup products have their own retention configuration options.

    1. Pradeep

      Thank you Vicki!

  33. Pradeep

    Hi Paul,

    Thanks for the post. Is there any possibility to change the daily backup schedule to weekly via Task Scheduler?

  34. Vicki C

    Thanks so much for this! I’m setting up my first Exchange Server and this site has been invaluable.

    I want to install Windows Server Backup on a two member DAG. Should I install the Server Role on both machines?

    And I’ve read that the EnableVSSWriter key set to 0 needs to be added for it to work properly.

    Is this a reasonable solution for a DAG?

    1. Avatar photo
      Paul Cunningham

      Yes, you can only backup the local server with WSB, so you’ll need to install it on every DAG member.

      That registry key is for Exchange 2010 and earlier, it is not required for Exchange 2013.

      1. Ranga

        Paul,

        i am getting below error on a DAG member after running my backup. This DAG hold all passive copies of my databases. now i added the registry key and trying to do backup.

        Writer Failures
        Writer Id: {76FE1AC4-15F7-4BCD-987E-8E1ACB462FB7}
        Instance Id: {01307CED-3EBB-4A81-999A-9B717968CD1E}
        Writer Name: Microsoft Exchange Writer
        Writer State: 1
        Failure Result: 800423F3
        Application Result: 1

        please suggest me

        1. Alex

          WBS can do only active copy of database.

  35. Gabriele Massari

    Hey Paul! Quick question, will backing up my DBs with this system also truncate the logs?

      1. Kelvin Chigorimbo

        Paul,

        Don’t you need to add the EnableVSSWriter key with a value of 1 in the registry for the logs to truncate?

  36. Lawrence

    Please help me to understand the advantage for using ‘hard disk that is dedicated to back up’. Currently, I am using the dedicated disk for the backup and the disk is installed on the Exchange Server. The other day, I would like to verify the back up on the test server (different hardware); however, I was NOT able to get the back up from the dedicated disk to test the restore. I would like to do the back up on the volume on which the data can be easily moved around. Please advise.

    1. Liber

      Hi, question if i use freefilesync for backup exchange 2013 database work good or is a bad idea?

Leave a Reply