Restore Exchange Data to Recovery Database
|
|
Overview
A recovery database (RDB) is a special kind of mailbox database that allows you to mount a restored mailbox database and extract data from the restored database as part of a recovery operation. After extraction, the data can be exported to a folder or merged into an existing mailbox. RDBs enable you to recover data from a backup or copy of a database without disturbing user access to current data.
You can restore the exchange server 2010 database backed up using to a Recovery Database and make use of it to recover a single Mailbox/Folder/Email.
Requirements
Microsoft Exchange Server 2010
Restoring to Recovery Database
Step 0 : Restore the files to a local location
Follow the steps upto step-3 mentioned in Exchange Server restore help document.
In step-4, choose the option "Restore data from backup server only (I will separately run through the 'locally restored files' to restore the Exchange Server later)" and proceed to restore the data to the specified location.
-
[Optional Step] You can now copy/move the *.edb and *.log files to a preferred location. Let the new location of the exchange datatabase and log files be "C:\Recovery Database Location". And let the *.edb file name be "Second Mailbox Database.edb" [for example]
NOTE :
- DO NOT rename the *.edb or *.log files. These files can be moved to any folder but strictly the file names should not be changed.
- It is recommended to have both the *.edb and *.log files in the same folder because it will be easier to run ESEUTIL and Exchange Management Shell commands with these files.
Go To Top ↑
Step 1 : Prepare the database and log files
-
Check the state of the restored *.edb file. We can use ESEUTIL to check the state of the database file. The state of the database may be 'Clean Shutdown' or 'Dirty Shutdown'. Run the following command in command prompt after changing to the "C:\Recovery Database Location" directory.
eseutil /mh "Second Mailbox Database.edb"
If the state of the database is 'Clean', there is no need of running additional commands. For the above example, the shutdown state of the database is 'Dirty Shutdown' which means this database cannot be mounted without bringing it to 'Clean Shutdown' state. We need to bring it to Clean Shutdown state before using it for the Recovery Database.
-
[Skip this step if the output of eseutil /mh is "Clean Shutdown"] Now run the following command [from the database/log file location] to perform a Soft Recovery of the database.
eseutil /R E02 /I /d
NOTE: E02 here is the log file base name [first three characters of the log file sequence] for our example. It may vary for your case and it may be E00, E01, E03 or other values.
-
Now again run eseutil with /mh switch [as in first step] to check the state of the database.
NOTE: Now the state of the database is 'Clean Shutdown' which means this database is now ready for mounting. If the database still remains in 'Dirty Shutdown' state, you may need to repair the database using /p switch [eseutil /p "EDB_FILE_PATH"] to bring it to Clean Shutdown state.
Go To Top ↑
Step 2 : Create Recovery Database and Mount it
-
We can now create a Recovery Database. Unlike other Exchange Server versions, this can only be done through Exchange Management Shell in Exchange Server 2010 environment. Open Exchange Management Shell and type the following command:
New-MailboxDatabase -Name "Recovery Database" -Server <EXCHANGE_NAME> -EDBFilePath "C:\Recovery Database Location\Second Mailbox Database.edb" -Logfolderpath "C:\Recovery Database Location" –Recovery

NOTE:
"Recovery Database" can be replaced with other name. This is the name of the Recovery Database that we create now.
<EXCHANGE_NAME> should be replaced with your Exchange Server name.
Values for the options -EDBFilePath and -Logfolderpath may change according to the *.edb and *.log file path in your client machine
While the Recovery Database is being created, you will get a warning that the restored database must be in a clean shutdown state. Since we have already made sure this is the case, we can continue.
Now mount the Recovery Database either from Exchange Management Console or from Exchange Management Shell by running the command Mount-Database "Recovery Database".
After mounting the Recovery Database, you can recover a single mailbox/folder/email from the Recovery Database.
Go To Top ↑
Mailbox / Folder / Email Recovery Tips
NOTE :
- Make sure the destination mailbox is enabled and existing in the Exchange Server.
- Make sure the database corresponding to the destination mailbox is mounted.
Before proceeding to recover the mailbox contents from Recovery Database, run the following command to get the details of mailboxes available in the Recovery Database.
Get-MailboxStatistics –Database "Recovery Database"
The above command can be run to make sure that the mailbox that we are trying to restore is existing in the Recovery Database.
Go To Top ↑
Restore a single mailbox
-
Run the following command to restore the content of mailbox 'company mailbox' in the Recovery Database to the production mailbox:
Restore-Mailbox –Identity "company mailbox" –RecoveryDatabase "Recovery Database"
Say 'Yes' for the confirmation asked. Restore process will start immediately.
When completed, you will get statistics about the restore mailbox job. You can see the information about the source and target mailbox database etc.
Go To Top ↑
Restore a single mailbox to a different mailbox
-
Run the following command to restore the content of 'company mailbox' in the Recovery Database to 'spare mailbox' under the folder 'Recovered Contents Folder' within 'spare mailbox':
Restore-Mailbox -Identity "spare mailbox" -RecoveryDatabase "Recovery Database" -RecoveryMailbox "company mailbox" -TargetFolder "Recovered Contents Folder"
NOTE : The above command will create a new folder "Recovered Contents Folder" inside "spare mailbox" and will restore the content of company mailbox into the new folder "Recovered Contents Folder"
Say 'Yes' for the confirmation asked. Restore process will start immediately.
When completed, you will get statistics about the restore mailbox job. You can see the information about the source and target mailbox database etc.
Go To Top ↑
Restore a single folder
-
Run the following command to restore the "Inbox" folder of mailbox 'company mailbox' in the Recovery Database to the production mailbox:
Restore-Mailbox –Identity "company mailbox" –RecoveryDatabase "Recovery Database" -IncludeFolders \Inbox
Say 'Yes' for the confirmation asked. Restore process will start immediately.
When completed, you will get statistics about the restore mailbox job. You can see the information about the source and target mailbox database etc.
Go To Top ↑
Restore a single email
-
This is like filtering the emails with specific string in specific headers/content and then restoring the matching items. The following example restores only the mail with the subject 'Meeting', with the message body containing the word 'official', and with the message location either in the Inbox or Calendar or Drafts folder. This example assumes that the mailbox is in English:
Restore-Mailbox -Identity "company mailbox" -RecoveryDatabase "Recovery Database" -SubjectKeywords "Meeting" -ContentKeywords "official" -IncludeFolders \Inbox,\Calendar
Say 'Yes' for the confirmation asked. Restore process will start immediately.
When completed, you will get statistics about the restore mailbox job. You can see the information about the source and target mailbox database etc.
Go To Top ↑
References:
Go To Top ↑
|