Thursday, June 27, 2013

Restoring Mailbox Data from a Recovery Database in Exchange 2010

After restore the successful database from the backup we can verify the database and log file. I can navigate out to the D:\ drive to view the files:

 Everything looks good so far, I just need to make a note of a couple things before I move on. Notice the directory structure in the above screen shot. The database was restored to a sub folder of the recovery location specified during the restore.

Getting the Database into a Clean Shutdown State

In order for Exchange to mount a database, it needs to be in a clean shutdown state. I'll use the Eseutil tool to play any outstanding transactions into the database to get it clean. Before I begin, I'll open a command prompt, switch to the directory that contains the database and logs, and use the following command to view the status:

The database state will be reported as Dirty Shutdown:

What I will do next is perform a soft recovery to get the database consistent. I'll run the following command to do this:

Once the operation has completed successfully, I can run eseutil again with the /mh switch to verify the database is clean shutdown:

Now that my database has been restored and brought to a clean shutdown state I can create the Recovery Database.

Creating the Recovery Database

The next step in the process is to create the Recovery database using the database files restored from the backup. To do this, I'll use the New-MailboxDatabase cmdlet with the following syntax:

New-MailboxDatabase -Name RDB1 -EdbFilePath D:\MountPoints\RES1\Database

RDB1.edb -LogFolderPath D:\MountPoints\RES1\Database -Recovery -Server mbx1

Now I can mount the database using the following command:

Mount-Database RDB1
The Recovery database is now mounted, and I'm ready to restore mailbox data.

Finding Mailboxes and Performing a Simple Mailbox Restore

Now that my Recovery database is online, I need to be able to see what mailboxes are available for restores. I can use the Get-MailboxStatistics cmdlet to do this:

Get-MailboxStatistics -Database RDB1
Sometime if we having multi-domain environment we cannot find the user in that case we need to run below cdmlet.

Set-AdServerSettings -ViewEntireForest $true
If you're looking for a specific mailbox, you can filter the results using the following syntax:

Get-MailboxStatistics -Database RecoveryDB | ?{$_.DisplayName -like 'Abdul*'}
So, let's take a look at the restore process. Based on the previous commands I can see that there is a copy of my mailbox in the Recovery database. To do a complete restore of the mailbox data to the original mailbox that is currently active in the production database I'll use the following command:
New-MailboxRestoreRequest -SourceDatabase RDB1 -SourceStoreMailbox Abdul-mumin' -TargetMailbox mpfeiffer
Depending on the size of the mailbox, it may take quite some time to perform the restore. I can keep tabs on the progress using the following one-liner:

Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics

Dealing with Multiple Mailboxes with the same Display Name

It's possible that a Recovery database will have multiple mailboxes with the same display name. This can happen if there were one or more disconnected versions of a mailbox, in addition to an active mailbox, in the same database during the time of the backup. In this case, you can use the MailboxGuid value to identify the source mailbox when doing a restore. Consider the following:

Get-MailboxStatistics -Database RDB1 | ?{$_.DisplayName -like 'dinesh*'} | fl DisplayName,MailboxGuid,DisconnectDate

New-MailboxRestoreRequest -SourceDatabase RDB1 -SourceStoreMailbox 4a1d2118-b8cc-456c-9fd9-cd9af1f549d0 -TargetMailbox singh

Restoring Individual Mailbox Folders

Here you can see that I am using the -IncludeFolders parameter to specify that only data from the Inbox should be restored from the mailbox in the recovery database:
New-MailboxRestoreRequest -SourceDatabase RDB1 -SourceStoreMailbox administrator -TargetMailbox administrator -IncludeFolders '#Inbox#'


  1. Thanks for detail information about exchange server corruption. It is really very bad situation faced by the Exchange server administrators. It is true that eseutil /p repair method remove the corrupt or unrecognized items from database (.edb) file to bring the database into consistent state. However, there are some third party tools which rebuild the corrupt items and make the database consistent. Thus, users should take backup on regular basis to prevent data loss situations and also to handle the disaster situations efficiently. In the absence of valid database backup, it is good to use a third party tool like this:

    This tool has been designed with strong scanning modes to handle the corruption and to prevent data loss issues. This software rebuilds the damaged items and enables the users to directly mount the database to MS Exchange Server.

  2. Perform all Exchange Server related task with Exchange Server Recovery software, this tool is proficient to Migrate edb file to other file format which you can select as per your requirement. Eligible to recover deleted emails, repair corrupt or damaged exchange server. It is an award winning utility which is recommended by most of technician.

    Use the Free Trial version to see the preview of recoverable original results.

  3. Nice article, thanks for sharing helpful guidelines to restore mailbox database from exchange server. I found this exchange mailbox recovery tool from which recovers permanently deleted mailboxes from offline edb files to accessible pst files data. It resolves all issues related to exchange server corruption. This tool converts inaccessible exchange edb files to accessible outlook pst files data and export all mailboxes or selected email items from offline edb files.