In a previous article I demonstrated how to restore Exchange Server 2013 databases using Windows Server Backup. In that scenario an entire database that had been lost needed to be recovered.

However in other recovery scenarios you may only want to recover one or several mailboxes, or even specific mailbox items, from a point in time without having to overwrite the entire database.

In Exchange Server 2013 we can do this with recovery databases, which operate basically the same as Exchange Server 2010 recovery databases. A recovery database allows us to mount a copy of a database on an Exchange server without having any impact on the live copy of that same database. In fact we can even use recovery databases to mount copies of databases from other servers within the same Exchange organization, thanks to database portability.

When a recovery database is mounted we can inspect it and restore items or mailboxes from it, but no clients can connect to it. So as the name suggests it can only be used for recovery purposes, not for active mailbox functionality.

Restoring an Exchange Server 2013 Database Using Windows Server Backup

Some backup applications have the capability to handle some or all of the process of creating a recovery database, restoring the database files, and extracting the desired mailboxes or items to a destination.

When using Windows Server Backup to perform a recovery you need to do pretty much all of the work yourself, so it is a good exercise for learning how to recovery Exchange 2013 databases.

In Windows Server Backup click Recover to start a new recovery.

exchange-2013-recovery-database-01

Choose the location where the backup is stored. In this example my backups are stored on the same server.

exchange-2013-recovery-database-02

Choose the backup date and time that you wish to restore.

exchange-2013-recovery-database-03

When recovering entire databases we would normally choose “Applications” and restore every database that was backed up on the server. However when working with recovery databases we can choose Files and folders and only restore the specific database and log files we need.

exchange-2013-recovery-database-04

Browse through the tree of available items and choose the database and log files you want to restore. I am restoring DB02 in this example. Note that restoring the database and logs will be two separate restore jobs if they are located in folders where you can’t select both at the same time.

exchange-2013-recovery-database-05

Choose to restore to Another location, and select a folder that has enough free space to hold the restored data.

exchange-2013-recovery-database-06

Confirm your selections and click Recover to begin the restore.

exchange-2013-recovery-database-07

You can close the progress window if you like and the job will continue running in the background.

exchange-2013-recovery-database-08

I’ve also run a second recovery job to restore the log files for DB02.

After you’ve completed your file restores the next step is making the database mountable.

Making the Restored Database Mountable

So far we’ve restored the database and transaction log files from a recent backup, but haven’t created the actual recovery database yet. If we created the recovery database right now, pointing it at the restored database and log files, and then tried to mount it, the database would fail to mount.

The reason for this is that the restored database is in a “dirty shutdown” state, which you can see by navigating to the restored database folder and running eseutil.exe.

F:\RecoveryDB\>eseutil /mh DB02.edb

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

Initiating FILE DUMP mode...
         Database: DB02.edb

            State: Dirty Shutdown

I have abbreviated the output of the above command, but basically you are looking for the “State” shown in the command output.

So we need to get the database file to a “clean shutdown” state before it can be mounted.

In my example I have:

  • A database file named DB02.edb in F:RecoveryDB
  • Transaction logs with the filename prefix E01 in F:RecoveryLogs

So my eseutil “soft recovery” command line will be:

F:\RecoveryDB\>eseutil /r E01 /l F:\RecoveryLogs /d F:\RecoveryDB

What that command means:

  • /r for “recovery” mode
  • E01 for the log file name  prefix
  • /l (lower-case L) to specify the path to the log files
  • /d to specify the path to the database file (but do not include the name of the file itself)
F:\RecoveryDB\>eseutil /r E01 /l F:\RecoveryLogs /d F:\RecoveryDB

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

Initiating RECOVERY mode...
    Logfile base name: E01
            Log files: F:\RecoveryLogs
         System files: 
   Database Directory: F:\RecoveryDB

Performing soft recovery...
                      Restore Status (% complete)

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

Operation completed successfully in 2.359 seconds.

After the command has completed check the state of the database with eseutil /mh again.

F:\RecoveryDB\>eseutil /mh DB02.edb

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

Initiating FILE DUMP mode...
         Database: DB02.edb

            State: Clean Shutdown

If soft recovery does not bring the database to a clean shutdown state you may consider a hard recovery, which will make the database mountable but risks some data loss in the process.

F:\RecoveryDB\>eseutil /p DB02.edb

exchange-2013-recovery-database-09

When the database is in a clean shutdown state you can create the recovery database.

Creating a Recovery Database in Exchange Server 2013

Creating a recovery database is performed using the New-MailboxDatabase cmdlet with the -Recovery switch. Notice that in this example I am using the same database and log file locations as my restored data.

[PS] C:\>New-MailboxDatabase -Server E15MB1 -Name RecoveryDB -Recovery -EdbFilePath F:\RecoveryDB\DB02.edb -LogFolderPath F:\RecoveryLogs
WARNING: Recovery database 'RecoveryDB' was created using existing file F:\RecoveryDB\DB02.edb. The database must be
brought into a clean shutdown state before it can be mounted.

Name                           Server          Recovery        ReplicationType
----                           ------          --------        ---------------
RecoveryDB                     E15MB1          True            None
WARNING: Please restart the Microsoft Exchange Information Store service on server E15MB1 after adding new mailbox
databases.

For more information about the warning to restart the Information Store service read this article. For a recovery database that you are only mounting for a short period of time an Information Store service restart may not be necessary.

Mount the recovery database.

[PS] C:\>Mount-Database RecoveryDB

Working with Recovery Databases

With the recovery database mounted you can use Get-MailboxStatistics to confirm that it contains mailbox database.

[PS] C:\>Get-MailboxStatistics -Database RecoveryDB | ft -auto

DisplayName                                                      ItemCount StorageLimitStatus          LastLogonTime
-----------                                                      --------- ------------------          -------------
SystemMailbox{849e4450-d32d-4a1b-90cf-5d0ca8109884}              239
Administrator                                                    102                           6/02/2014 11:06:56 PM
Discovery Search Mailbox                                         3
Aisha Bhari                                                      14996                          7/02/2014 2:05:18 AM
Alison Lindsay                                                   5848                          7/02/2014 12:04:59 AM
Ambrine Berry                                                    5849                           7/02/2014 1:01:17 AM
Ann Parker                                                       6107                           7/02/2014 1:01:34 AM
Bina Faria                                                       15055                          7/02/2014 2:03:36 AM

...snip...

After you have confirmed that data is available for restore you can begin your mailbox or item recovery.

In the next articles in this series we’ll cover different mailbox and item recovery scenarios.

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

    Hi Paul,

    I have Exchange Server 2013 working in good condition, if my Active directory hardware failure, how can up my Exchange server 2013.

    Thanks for your early response.

  2. ALI ZAFAR

    Dear Paul
    my database are in dirty shutdown when i run eseutil /ml E01 it is showing in the logs .it seems log files are corrupted “Error – JET_errLogFileCorrupt ”
    i can restore and mount the database if i remove all logs files but i will lose some data which is not commited with edb file .
    let me know any procedure to recover logs file and mount that database without any lose of data .
    also i want to know if i delete all logs and mount database how much possibility of dataloss “a day or two”.

  3. Basti Petrov

    Hello Paul,

    Hoping to get an answer as to whether or not this is possible…I have Exchange 2013 .edb and its log files that are in clean shutdown state. I have to recover it to a new domain and new server.
    Built a new domain, setup new exchange and am trying to mount this .edb to no avail. It seems obvious that it cannot mount as the AD holds no GID of the original DB (at least according to event logs).
    Error I am getting while trying to mount it is:
    Failed to mount database “MailboxDatabase”. Error: An Active Manager operation failed. Error: The database action
    failed. Error: Operation failed with message: MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005,
    ec=1105)

    Is it even possible to restore without having original AD restored? I built AD, server, ORG using same naming but IDs in AD will obviously be different.

    Any suggestion is greatly appreciated.

  4. Kris Callahan

    How can you tell if one of your current databases is a recovery database? We have Exchange 2013.

    Thanks!

  5. Christian Alarcon

    Hi Paul,

    I am trying to create a RecoveryDB, but I have the following error:

    Active Directory operation failed on DC02. This error is not retriable. Additional information: The
    attribute syntax specified to the directory service is invalid.
    Active directory response: 0000200B: AtrErr: DSID-031519E0, #1:
    0: 0000200B: DSID-031519E0, problem 1002 (INVALID_ATT_SYNTAX), data 0, Att 200f4 (homeMDB):len 144
    + CategoryInfo : NotSpecified: (:) [New-MailboxDatabase], ADOperationException
    + FullyQualifiedErrorId : [Server=Exchange,RequestId=a00d73b3-0556-466c-8036-21c95921720f,TimeStamp=8/15/2019 2:5
    9:48 PM] [FailureCategory=Cmdlet-ADOperationException] 99F29051,Microsoft.Exchange.Management.SystemConfigurationT
    asks.NewMailboxDatabase
    + PSComputerName : Exchange

    I am testing my backups to see if I can restore mailboxes but I found the problem above, I would like to fix it to avoid to have issues in a real needs of recovery process.

    1. Kashif hasnain

      Did you ever get a solution for this.
      I am also using dell EMC avamar to restore my database but it is failing with the same error.
      Just to let you know that the avamar plug-in which i am using to for restore creates recovery db automatically when the restore is initiated but still fails with this error.

  6. Nick Cottrell

    Paul,

    Does “No, recovery databases can only be used on the same version as the server they come from.” apply to 2013 DB on a 2016 server since they are both version 15?

    Based on the build numbers , Exchange 2016 could be considered 2013 sp1 😉

    Nick

  7. Ayrton Manhica

    Hi Paul,

    On trying to mount the database i get this error message “Error: Operation failed with message: MapiExceptionTooManyMountedDatabases: Unable to mount database.”

    Trying to force the mount won’t work either. Any ideas?

  8. JOhn

    Hi can you pls advise how do we do a hard recovery?

  9. Pam

    Wow- I will give it a try. Thank you, you Rock!

    1. Pam

      Dell Pro-support helped me get my recovery database functional. After following your instructions with eseutil, the New-MailboxDatabase commandlet created a new recovery database that was a fraction the size of the original “restored from backup” database. The Dell support engineer changed the names, first changing the small RecoveryDB.edb to OldRecoveryDB.edb and then naming the original, large “restored from backup” database, RecoveryDB. He then ran the commandlet Set-MailboxDatabase recoverydb -AllowFileRestore $true and then mounted the database. Restores worked perfectly after that.

      I don’t know if this is a bug in Exchange 2013 CU21 or something peculiar to my servers. But good to put it out here on the web in case it happens to someone else.

      Thank you, Paul. I continually refer to your blog for answers and have completed all but your latest PluralSight course. Managing Exchange just might be impossible if it weren’t for your excellent articles and teaching.

      1. Paul Cunningham

        Yes. If you create the new recovery database in a path that is different to where the restored database files sit, then it will create a new database file which is very small. You then need to copy the restored files into place.

        If you create the new recovery database and point it to the path where you’ve already restored the files to, it will just use those files.

        Either method works. In my article above I am demonstrating the second approach.

        1. Pam

          I followed your directions – no path changes. Still got that odd result. Your instructions are perfect and very clear… as always.

          1. Pam

            Fine with me if you’d like to remote in and verify.

        2. Kris Callahan

          How can you tell if one of your current databases is a recovery database? Exchange 2013.

  10. Pam

    I’m running Exchange 2013 CU21. After restoring a database from backup & following your instructions above all works well except the new RecoveryDB has a content index state that is disabled. I have run Set-MailboxDatabase RecoveryDB -IndexEnabled $True before and after starting and stopping search services.
    When I run Get-MailboxDatabase RecoveryDB | Select Name, IndexEnabled the output is IndexEnabled True. But Get-MailboxdatabaseCopyStatus still shows ContentIndexState Disabled.

    Any idea how to clear this error?

    1. Paul Cunningham

      The recovery DB doesn’t need a working index. It only exists so you can extract mailbox contents back into your mailboxes on the active database.

      1. Pam

        That is what I am trying to do. Are you saying I can restore items from the recovery database to the active database without a recovery database index?

  11. Santhosh Sivaraman

    I have moved one of our customers Exchange Server 2007 mailboxes to Exchange Server 2013. Currently we are in the decommissioning phase of Exchange Server 2007. Due their policy they supposed to maintain the Exchange Server 2007 backup for next five years. Do we need to maintain the legacy server for next five years to restore the mailbox / items or is there any way to restore the legacy server backup to Exchange Server 2013? In this case, what would be the best option?

    1. Paul Cunningham

      If you want to restore into that environment, then you either need to keep the server running, or be able to duplicate the same AD/Exchange into an isolated environment for restore purposes.

      Alternatively, invest in tools that permit you to mount and extract data from mailbox databases without an Exchange server. The tools vary in quality, so you’ll need to do your own testing to be sure you get one that meets your needs.

      1. Santhosh Sivaraman

        Thank you very much for your recommendation. It is really appreciable

  12. Vinod Kumar

    Dear Sir,

    I am new in this field. I want to recover Exchange Server. I have complete backup of server. Please tell me the steps to recover that server. I have installed Windows 2012 Standardar OS on 1 system.

    Please tell me rest process one by one.

    Regards
    Vinod Kumar

  13. Rombe

    Thanks for this!

    If you try doing the recovery on more than 1 database it seems to complain about the log files missing but all you need to do is use /s in the recovery command like this:
    eseutil /r E01 /l F:RecoveryLogs /d F:RecoveryDB /s F:RecoveryDB

  14. Dylan Haigh

    Greetings,

    I watched a YouTube video from Exchange Server Pro, called “Restoring Individual Mailbox Items in Exchange Server 2010”. It was very informative and worked for me (except for one thing).

    Restore-Mailbox -Identity “User Name” -RecoveryDatabase “Recovery Database” -RecoveryMailbox “User Name” -TargetFolder MailboxRestore

    After running that command and continuing through the prompt, it finished with an error.

    Error was found for User Name (UserName@MyDomain.net) because: Error occurred in the step: Moving messages. This mailbox exceeded the maximum number of corrupted items specified for this move mailbox operation., error code: -1056749110
    +CategoryInfo : InvalidOperation: (0:Int32) [Restore-Mailbox}, RecipientTaskException
    +Fully QualifiedErrorId : 80DDFEB1,Microsoft.Exchange.Management.RecipientTasks.RestoreMailbox

    I have a Report File from the restore mailbox operation if you are interested in reading what it says. Basically, there are 18 items that couldn’t be moved to the target mailbox. I’m wondering why they couldn’t be moved. I assume everything else was moved. However, those items that were moved are (knowing my luck) the emails that he couldn’t find from his Inbox.

    Let me know what you suggest I should do.

    Many thanks,

    Dylan

    1. Dylan Haigh

      Actually, I’m pretty sure I know what the issue is…

      The BadItemLimit was set to default and I need to set to something higher than 0.

      So, I just ran the command:

      Restore-Mailbox –Identity “User Name” –RecoveryDatabase “Recovery Database “User Name” –TargetFolder MailboxRestore -BadItemLimit 1000

      That should fix it. 🙂

  15. Agila Nance

    Thanks for sharing this information. Recently I faced corruption issues and recovered the data through your post.

  16. Tim

    I’m in the middle of migrating from 2010 to 2013. We have some legal discoveries that have lingered on and on. My question is can I mount a restored 2010 edb and log files as a recovery database on the 2013 server or do I need to keep my 2010 box around indefinitely to handle possible legal discovery requests?

    1. Paul Cunningham

      No you can’t mount a 2010 database on a 2013 server, even as a recovery server.

      So yes, if you anticipate this need then retaining a 2010 server would be wise.

  17. Yusuf amruddin

    Hi Paul,

    I am getting this error when I am trying to create a new mailbox -Recovery switch.

    090112846.edb -LogFolderPath F:RecoveryLogs
    The term ‘New-MailboxDatabase’ is not recognized as the name of a cmdlet, function, script file, or operable program. C
    heck the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:20
    + New-MailboxDatabase <<<< -Server EXCHSRV2010 -Name RecoveryDB -Recovery -EdbFilePath F:RecoveryDBMailbox_Database_
    1090112846.edb -LogFolderPath F:RecoveryLogs
    + CategoryInfo : ObjectNotFound: (New-MailboxDatabase:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    thank you.
    Yusuf

  18. Dan

    Hey, Paul.

    Great series of articles! I need to perform a DB recovery and this really makes it easier.

    One question: Can I mount a recovery DB in Exchange 2013 using a DB that I saved from my old Exchange 2007 system? The DB restore is the most difficult part of the process, because the restore job takes 1-2 days, and is prone to failure and restart over even the slightest network blip.

    Thanks,
    Dan

    1. Paul Cunningham

      No, recovery databases can only be used on the same version as the server they come from.

      1. Benoit

        Hello,

        What about recovery databases on Exchange 2016 with different cumulative updates ?

        Thanks.

        Benoît

        1. Paul Cunningham

          Probably fine in most cases but I can’t account for every possible variable there. Try it, if it doesn’t work, open an MS support case for further assistance.

  19. Andrew

    That’s too bad that 2013 is the same way, with the dirty shutdown problem…

  20. DammyJ

    Hello Paul,

    Thanks for this information. but i will like you to show me how to restore the log files. Exchange is using the default locations and i can seem to identify the logs to restore.

    Thanks

Leave a Reply