Exchange 2010 Mailbox Database Backup and Restore with Windows Server Backup

In this post I will demonstrate how to use Windows Server Backup to backup and restore a mailbox database for Exchange Server 2010.

There are three parts to this tutorial:

The server I am using is running Windows Server 2008 R2 and has Exchange Server 2010 installed with the Mailbox server role.  A single mailbox database has been configured, and one mailbox exists in the database.

Watch the video here or scroll down for the complete step by step process.


Installing Windows Server Backup on Windows Server 2008 R2


Windows Server Backup is not installed by default, so the first step here is to install it.  Open an elevated Powershell session and run the following commands.

PS C:\> Import-Module servermanager
PS C:\> Add-WindowsFeature backup

Windows Server Backup can now be launched from the Administrative Tools menu.

Windows Server Backup

The Windows Server Backup console



Backing Up an Exchange 2010 Mailbox Database

If the server that will run the backup is a DAG member and you are using Windows Server Backup there is a registry change required first. See Windows Server Backup Completed with Warnings for Exchange 2010 Mailbox Server.

From the Windows Server Backup window click on Backup Once.

Start a Windows Server Backup of Exchange 2010

Start a Windows Server Backup of Exchange 2010

There is no existing scheduled backup on this server, so Different Options is the only selection.  Click Next to continue.

Choose whether to use existing backup options on the server

Choose whether to use existing backup options on the server

At the next step I’m choosing a Custom configuration so that I can look closer at the volumes to be backed up.  Click Next to continue.

Choose a Custom backup in Windows Server Backup

Choose a Custom backup in Windows Server Backup

Now it is time to select the volumes to be backed up.  For an Exchange Server 2010 mailbox database backup we need to choose any volumes that have Exchange database or log files on them.  The entire volume needs to be backed up, not just the folder holding those files.

Click the Add Items button to open the selections dialog.

In this case the mailbox database is on volume D:, while the transaction logs are on volume C:, so both volumes are selected.  Click OK to close the dialog.

Select the volumes containing Exchange application files

Select the volumes containing Exchange application files

Next click the Advanced Settings button.

Before starting the Exchange 2010 mailbox database backup some advanced settings are needed

Before starting the Exchange 2010 mailbox database backup some advanced settings are needed

Select the VSS Settings tab and make sure that VSS full backup is chosen.  Click OK and then Next to continue.

Choose VSS Full Backup for Exchange 2010 mailbox database backups

Choose VSS Full Backup for Exchange 2010 mailbox database backups

The backup can be stored on either a local drive or a remote network share.  In this demonstration I’m backing up to a local drive.

Choose to backup Exchange to a local drive or remote network share

Choose to backup Exchange to a local drive or remote network share

Select the volume to back up the Exchange 2010 mailbox database to.  You can’t choose a volume that is part of the backup selections list.  Click Next to continue.

Choose the volume to back up Exchange 2010 to

Choose the volume to back up Exchange 2010 to

When you are happy with your selections click Backup to start the backup.

Start the Exchange 2010 mailbox database backup

Start the Exchange 2010 mailbox database backup

The time taken to backup will depend on the size of your mailbox database.

Running an Exchange Server 2010 Mailbox Database Backup

Running an Exchange Server 2010 Mailbox Database Backup

When the backup is complete click the Close button.

Exchange 2010 Mailbox Database backup is complete

Exchange 2010 Mailbox Database backup is complete

Verify that the backup was successful.  You can also click the View Details link to see more information.

Exchange 2010 Mailbox Database backup result

Exchange 2010 Mailbox Database backup result



Restoring an Exchange Server 2010 Mailbox Database


For this demonstration the mailbox database has been dismounted and the database file deleted.  The Exchange server is unable to mount the database due to the missing file.

Unable to mount Exchange 2010 Mailbox Database due to missing file

Unable to mount Exchange 2010 Mailbox Database due to missing file

The mailbox database needs to be recovered from the previous good backup.  But first we need to mark the mailbox database as restorable.  In the Exchange Management Console open the properties of the mailbox database.

Open the Mailbox Database properties

Open the Mailbox Database properties

Select the Maintenance tab and tick the box This database can be overwritten by a restore.

Enable the Exchange 2010 mailbox database to be overwritten by a restore

Enable the Exchange 2010 mailbox database to be overwritten by a restore

You can also use the Exchange Management Shell to perform this task.

[PS] C:\>Set-MailboxDatabase "Mailbox Database EX2 01" -AllowFileRestore $true

In Windows Server Backup click on Recover to start the Recovery Wizard.

Start the Windows Server Backup Recovery Wizard

Start the Windows Server Backup Recovery Wizard

The previous backup is stored on the local server in this case.  Click Next to continue.

Choose the backup location to restore the Exchange 2010 Mailbox Database from

Choose the backup location to restore the Exchange 2010 Mailbox Database from

A calendar is displayed with all of the dates that backups occurred on highlighted in bold.  If more than one backup was taken on that date then there are multiple entries in the drop down list.  Choose the backup that you want to restore from, usually the most recent one.  Click Next to continue.

Select the backup date to restore the Exchange 2010 Mailbox Database from

Select the backup date to restore the Exchange 2010 Mailbox Database from

The recovery type for an Exchange 2010 mailbox database restore is Application.  Select the recovery type and click Next to continue.

Choose the Application recovery type for Exchange 2010 Mailbox Database recovery

Choose the Application recovery type for Exchange 2010 Mailbox Database recovery

Windows Server Backup detects the type of application that was backed up and shows you a list.  Because this is the most recent Exchange server backup it also offers the option to not roll forward the database once the restore has been completed.  This means that the transaction logs that were written on the server since the time of the backup will be replayed into the restored database, bringing it completely up to date.

If you don’t want to roll the database forward (ie you are trying to recover the database to a specific point in time) then tick the box.  Otherwise click Next to continue.

Choose the application to restore and whether to roll the Exchange database forward

Choose the application to restore and whether to roll the Exchange database forward

In this example we’re recovering a lost database, so we will be restoring it to the original location.  If you do not want to overwrite an existing database you can choose to restore to an alternate location instead.  Click Next to continue.

Choose to recover the Exchange 2010 Mailbox Database to its original location or an alternate location

Choose to recover the Exchange 2010 Mailbox Database to its original location or an alternate location

When you’re ready to proceed click Restore to begin the recovery.

Begin the Exchange 2010 Mailbox Database restore

Begin the Exchange 2010 Mailbox Database restore

The restore time will depend on the size of the mailbox database being recovered.  When the restore is complete click on Close.

Exchange 2010 Mailbox Database restore complete

Exchange 2010 Mailbox Database restore complete

In the Application Event Log of the server we can see the recovery operation has taken place.

First the restore is begun:

Log Name:      Application
Source:        MSExchangeIS
Date:          12/4/2010 8:51:30 PM
Event ID:      9725
Task Category: Exchange VSS Writer
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      EX2.exchangeserverpro.local
Description:
Exchange VSS Writer will restore a backup set to database 'Mailbox Database EX2 01', which is the same database from which the backup was originally taken.

Then the restore is completed successfully:

Log Name:      Application
Source:        MSExchangeIS
Date:          12/4/2010 8:51:40 PM
Event ID:      9756
Task Category: Exchange VSS Writer
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      EX2.exchangeserverpro.local
Description:
Exchange VSS Writer successfully restored the backup set to database 'Mailbox Database EX2 01'. To bring the restored databases to a clean-shutdown state, database recovery will be performed using the information in the restore environment document 'C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database EX2 01\E00restore.env'.

The existing transaction log files are then replayed into the database to roll it forward:

Log Name:      Application
Source:        ESE
Date:          12/4/2010 8:52:15 PM
Event ID:      301
Task Category: Logging/Recovery
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      EX2.exchangeserverpro.local
Description:
Information Store (2608) Mailbox Database EX2 01: The database engine has begun replaying logfile C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database EX2 01\E000000004D.log.

And finally the mailbox database is mounted:

Log Name:      Application
Source:        MSExchangeIS Mailbox Store
Date:          12/4/2010 8:52:32 PM
Event ID:      9523
Task Category: General
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      EX2.exchangeserverpro.local
Description:
The Microsoft Exchange Database "Mailbox Database EX2 01" has been started. 

Database File: D:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database EX2 01\Mailbox Database EX2 01.edb
Transaction Logfiles: C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database EX2 01\
Base Name (logfile prefix): E00
System Path: C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database EX2 01\
(Start Duration=00:00:03.032)

The mailbox database has now been recovered.

About Paul Cunningham

Paul is a Microsoft Exchange Server MVP and publisher of Exchange Server Pro. He also holds several Microsoft certifications including for Exchange Server 2007, 2010 and 2013. Connect with Paul on Twitter and Google+.

Comments

  1. Alan Temperly says:

    After the backup is completed. When I go to recovery wizard at select recovery type = Applications option is greyed out. How can I resolved this so I can select applications?

  2. Great stuff Paul!

    This was very helpful. Thank you for your time and effort.

  3. Excellent doc Paul – Can you please explain why the back up has to be done at volume level and why the backup cannot be performed at folder level?

    Cheers!

  4. Christophe says:

    Great doc! Was very helpful to restore the mailbox database!

    Thx Christophe

  5. Excatly, which is the reason that i can’t select single folder? I have and SBS 2011 with exchange 2010. The database and log is on the same volume. If i move Datastore and Log on two different volume is it possibile to backup only these two volumes?

    Best regards

  6. svetlana says:

    Hi! What about saving/detetion transaction logs after backup completes? Do we need to delete all logs after successful bakup? Can we do it manually from task (script)? Otherwise we will get ampty disk space, is not it?

  7. Excelente Tutorial.
    Thanks.

  8. Guillaume Roche says:

    Hi,
    Great tutorial thanks, but when i restored my exchange only the mails was restored, the new users since the last recovery or the new distribution group was not restored … how to explain that ?
    Thanks for all
    Best regards,

  9. You make it very clear that when using Windows Server Backup, entire volumes need to be backed up as opposed to individual databases. If I wanted to restore and overwrite a single database but my volume restore contained several databases, would it be acceptable to just select the ‘This database can be overwritten by a restore’ option for the one database that I want to overwrite. What would happen with the other databases that are being restored if I chose to restore to original location but the ‘This database can be overwritten by a restore’ option was not selected. Thanks!

  10. Hi Please can you help me? I have an Exchange 2010 sp1 server on Windows Server r2. The backs up are configured correctly but the Transactiion log just wont clear. the logs are now at 125 and 175 on two mailstores.

    Please help

  11. Sebastien says:

    Hi,

    Be carrefull, Windows Server Backup does not check database integrity, it just save files and says nothing. You could lost all your mail by using this and take no preventive actions.
    Check your database integrity each time you backup, or you will have good surprises in restoring corrupted data…

  12. Sebastien says:

    Hi,

    Be carefull, Windows Server Backup does not check database integrity, it just saves files and says nothing. You could lost all your mail by using this if you’re taking no preventive actions.
    Check your database integrity each time you backup, or else you will have very bad surprises in restoring corrupted data…

  13. Bert Leen says:

    Hi.

    Don;t worry friends here is solution for your all problems related exchange server mailbox, Kernel for exchange server make tool for restore with windows server backup and recover all mails in edb file format from corrupt and damaged MS exchange server all versions. for more details visit in search engine Kernel email recovery software.

  14. Hi…. Thanx alot :-) gr8 stuff
    Bt i m facing a prblm while taking backup, there is an error saying “backup operation failed, cannot create shadow copy”. I tried alot f thing bt stil nt wrking please help me out neone of you guys :-)

  15. Nice Tutorial.

  16. great
    it’s very helpful

  17. vinayagam says:

    After the backup is completed. When I go to recovery wizard at select recovery type = Applications option is greyed out. How can I resolved this so I can select applications?

  18. So I have an Exchange 2010 lab running on Hyper-V 2008 R2. I built another guest VM and installed Windows Server Backup. I cannot get that to work, getting VSS errors. Do you know if this will work inside a VM? Just trying to go through some backup/recovery testing using a real life backup solution. Thanks

  19. Kwame Danquah Jnr says:

    So after the backup has been restored to the original location users automatically have all info restoredon outlook?

    Are there any steps to make sure all users have their old mail?

    thanks

    • After you finish the restore of a database it, and the data within it, are accessible to the users.

      • Kwame Danquah Jnr says:

        Thanks Paul, I have a hyperV server that took the place of the main exchange when it was down so its the main server now.

        How do i point all users to the restored exchange server so they can see their old emails?

        Thx

  20. Thank you for the good writeup. It if truth be told was once a amusement account it.
    Glance complex to more introduced agreeable from you! By the way, how can we communicate?

  21. Sys Admn says:

    Backup works great, however the backup drive fills up after a month. There is no option to Groom or Remove older backups. Google does not help either, there is a MSDN how to schedule Task, but it is for essentials version of windows 2008 R2, as my version Standard does not have the Server or Cleanup options in Task scheduler.

    Do you have any suggestion or solution for removing older backups automatically. Also, the format of backups is in .VHD file, so I can’t even delete manually… any help is appreciated…

    • Interesting. I always just configure the destination disk as a dedicated backup disk in Windows Server Backup, and it automatically removes the oldest backups when necessary to make room for new ones.

  22. Hi Paul,

    Thank you for the tutorial.

    I am a big fan of you and have learned alot from your tutorials and bootcamp Videos.

    Thanks again

    Sadiq Mohammed

  23. Great article and website Paul, a really useful Exchange resource.

    In relation to backups, you mention that you have to backup all volumes, and not just the folders, that contain Exchange databases and logs. Unfortunately my Exchange Database volume is larger (~11TB) than 2TB thus hitting the wbadmin limit. Can you advise if there is way around it using Windows Server Backup? Why can’t you backup just the folders containing the databases?

    Thanks

  24. Hi Paul,
    I have exchange 2010 server1 and I use window server backup utility. Can I use this backup and restore it with this method to server2 which is a different hardware[virtual machine] but with the same configuration?
    Server2 is offline and is being used for testing purpose only.

  25. Paul,

    Wonderful stuff. Does this take mail offline or is this doable while mail is up? ie exchange running?

    • Backup can be online. Restoring over an existing database requires the database to be dismounted first. Restoring into a recovery database doesn’t require the primary database to be dismounted.

  26. Hi Paul – We had a power outage and the outlook got disconnected. We have Exchange Server 2010 on SBS 2011. Outlook 2007 and 2013 editions. We have two databases. Mailbox database and Public Folder database. A log file went missing and both got dismounted. It gave MapiExceptionJetErrorMissingLogFile: Unable to mount database. (hr=0×80004005, ec=-528)

    So, I ran the eseutil command and found this:
    C:\Windows\system32>eseutil /mh “C:\Program Files\Microsoft\Exchange Server\V14\
    Mailbox\Mailbox Database\Mailbox Database.edb”

    Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
    Version 14.01
    Copyright (C) Microsoft Corporation. All Rights Reserved.

    Initiating FILE DUMP mode…
    Database: C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbo
    x Database\Mailbox Database.edb

    DATABASE HEADER:
    Checksum Information:
    Expected Checksum: 0x10f8b2d3
    Actual Checksum: 0x10f8b2d3

    Fields:
    File Type: Database
    Checksum: 0x10f8b2d3
    Format ulMagic: 0x89abcdef
    Engine ulMagic: 0x89abcdef
    Format ulVersion: 0×620,17
    Engine ulVersion: 0×620,17
    Created ulVersion: 0×620,17
    DB Signature: Create time:09/24/2013 21:47:10 Rand:11751346 Computer:
    cbDbPage: 32768
    dbtime: 31404029 (0x1df2ffd)
    State: Dirty Shutdown
    Log Required: 16602-16605 (0x40da-0x40dd)
    Log Committed: 0-16606 (0×0-0x40de)
    Log Recovering: 0 (0×0)
    GenMax Creation: 03/15/2014 11:03:11
    Shadowed: Yes
    Last Objid: 2933
    Scrub Dbtime: 0 (0×0)
    Scrub Date: 00/00/1900 00:00:00
    Repair Count: 2
    Repair Date: 09/24/2013 21:47:10
    Old Repair Count: 0
    Last Consistent: (0×4047,8,1F) 03/13/2014 00:21:11
    Last Attach: (0×4048,9,86) 03/13/2014 00:21:20
    Last Detach: (0×0,0,0) 00/00/1900 00:00:00
    Dbid: 1
    Log Signature: Create time:09/30/2013 15:00:13 Rand:243347892 Computer:
    OS Version: (6.1.7601 SP 1 NLS ffffffff.ffffffff)

    Previous Full Backup:
    Log Gen: 16565-16585 (0x40b5-0x40c9) – OSSnapshot
    Mark: (0x40CA,8,16)
    Mark: 03/14/2014 21:07:21

    Previous Incremental Backup:
    Log Gen: 0-0 (0×0-0×0)
    Mark: (0×0,0,0)
    Mark: 00/00/1900 00:00:00

    Previous Copy Backup:
    Log Gen: 0-0 (0×0-0×0)
    Mark: (0×0,0,0)
    Mark: 00/00/1900 00:00:00

    Previous Differential Backup:
    Log Gen: 0-0 (0×0-0×0)
    Mark: (0×0,0,0)
    Mark: 00/00/1900 00:00:00

    Current Full Backup:
    Log Gen: 0-0 (0×0-0×0)
    Mark: (0×0,0,0)
    Mark: 00/00/1900 00:00:00

    Current Shadow copy backup:
    Log Gen: 0-0 (0×0-0×0)
    Mark: (0×0,0,0)
    Mark: 00/00/1900 00:00:00

    cpgUpgrade55Format: 0
    cpgUpgradeFreePages: 0
    cpgUpgradeSpaceMapPages: 0

    ECC Fix Success Count: none
    Old ECC Fix Success Count: none
    ECC Fix Error Count: none
    Old ECC Fix Error Count: none
    Bad Checksum Error Count: none
    Old bad Checksum Error Count: none

    Last checksum finish Date: 00/00/1900 00:00:00
    Current checksum start Date: 00/00/1900 00:00:00
    Current checksum page: 0

    Operation completed successfully in 2.449 seconds.

    C:\Windows\system32>eseutil /ml “C:\Program Files\Microsoft\Exchange Server\V14\
    Mailbox\Mailbox Database\E00″

    Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
    Version 14.01
    Copyright (C) Microsoft Corporation. All Rights Reserved.

    Initiating FILE DUMP mode…

    Verifying log files…
    Base name: E00

    Log file: C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox D
    atabase\E0000000001.log – OK
    Log file: C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox D
    atabase\E00.log – OK

    No damaged log files were found.

    Operation completed successfully in 0.468 seconds.

    C:\Windows\system32>eseutil /p “C:\Program Files\Microsoft\Exchange Server\V14\M
    ailbox\Mailbox Database\Mailbox Database.edb”

    Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
    Version 14.01
    Copyright (C) Microsoft Corporation. All Rights Reserved.

    Initiating REPAIR mode…
    Database: C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox
    Database\Mailbox Database.edb
    Temp. Database: TEMPREPAIR5948.EDB

    Checking database integrity.

    The database is not up-to-date. This operation may find that
    this database is corrupt because data from the log files has
    yet to be placed in the database.

    To ensure the database is up-to-date please use the ‘Recovery’ operation.

    Scanning Status (% complete)

    0 10 20 30 40 50 60 70 80 90 100
    |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
    ……………………………………………

    Scanning the database.

    Scanning Status (% complete)

    0 10 20 30 40 50 60 70 80 90 100
    |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
    ……………………………………………

    Repairing damaged tables.

    Scanning Status (% complete)

    0 10 20 30 40 50 60 70 80 90 100
    |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|

    Deleting unicode fixup table.

    Deleting MSObjids.

    Deleting MSysLocales.
    ……………………………………………

    Repair completed. Database corruption has been repaired!

    Note:
    It is recommended that you immediately perform a full backup
    of this database. If you restore a backup made before the
    repair, the database will be rolled back to the state
    it was in at the time of that backup.

    Operation completed successfully with 595 (JET_wrnDatabaseRepaired, Database cor
    ruption has been repaired) after 737.916 seconds.

    C:\Windows\system32>eseutil /d “C:\Program Files\Microsoft\Exchange Server\V14\M
    ailbox\Mailbox Database\Mailbox Database.edb”

    What will be the next step Paul? Please help . I’m a newbie and don’t want to have a corruption in the database or in the log files. Please help by giving me step by step directions.

Leave a Comment

*

We are an Authorized DigiCert™ SSL Partner.