How to Restore Mailboxes From Recovery Database Using PowerShell (Exchange 2016)

Summary: The blog describes the complete procedure to restore mailbox from the Recovery database in the Exchange Server 2016. It explains the process to create the recovery database, restore database via Windows Server Backup as well as the process to execute mailbox restore request to retrieve data from mailboxes in the recovery database.

Exchange Server 2016 allows DBAs to mount a copy of the mailbox database on the Exchange Server using the recovery database. It does not put any impact on the active copy of the mailbox database that is in the running mode. Recovery database cannot be accessed by end users via MS Outlook or any other client emailing application and are only accessible to administrators liable to perform mailbox restore operations.

Exchange Server 2016 mailbox database can be mounted from any server within the same organization using the recovery database following the given guidelines:

• Create Recovery Database on Exchange Server 2016
• Restore Exchange database backup into Recovery Database
• Run one or more mailbox restore requests
• Remove Recovery Database when it is not required anymore

Want help to Restore Exchange database without creating Recovery Database. Download Stellar Repair for Exchange Software to repair Exchange database file even after severe database corruption. 

Download Button

Rating by MVP:

Reference: https://gallery.technet.microsoft.com/office/Exchange-2016-Recover-a-87622713

Let’s look at each step in detail.

Step #1: Create Recovery Database on Exchange Server 2016
To create the Recovery Database, use New-MailboxDatabase cmdlet in Exchange PowerShell. If you know the name of the EDB file, you can restore it now. In case the name of the EDB file is unknown or you want to modify it at a later stage, then you can do it any time after the restore process is initiated.

Create a Recovery Database and give it a unique name. For EDBFilePath parameter, use the name and storage path of the database file and for LogFolderPath parameter, use the location of the recovered log files.

“New-MailboxDatabase -Recovery -Name <RDBName> -Server <ServerName> -EdbFilePath <RDBPathandFileName> -LogFolderPath <LogFilePath>”

Example:
The example given below illustrates PowerShell cmdlet to create a Recovery Database that will be used further for restoring DB01.edb and its corresponding transaction log files located at E:\Databases\RDB01

“New-MailboxDatabase -Recovery -Name <RDBName> -Server <ServerName> -EdbFilePath “E:\Databases\RDB1\DB1.EDB” -LogFolderPath “E:\Databases\RDB1″”

Step #2: Restore Database Backup into the Recovery Database
After creating the recovery database, it is recommended to restart the Microsoft Exchange Information Store service by using the following cmdlet:

“Restart-Service MSExchangeIS”

The next step is to mount the recovery database. Here, it is important to mention that the backup strategy and software that you use decides the Exchange Server 2016 restoration process. It will be helpful to refer to the documentation and guidelines provided by the vendor.

Restore Database from Windows Server Backup
Recovery databases are not utilized by a number of backup solutions as they use their dedicated utility for opening the restored database file and retrieve content that may be used for recovery. However, a number of recovery solutions such as Windows Server Backup use recovery database approach which we will discuss in the upcoming section.

1. Open Windows Server Backup and click on Recover to begin a new recovery.
2. Next, in the Recovery Wizard, select appropriate option from the given alternates:
o This Server (Server name)
o A backup stored on another location
In this example, backup stored on another location has been selected.
3. Next, click on Specify Location Type and then select Local drives under What is the location type where the backup is stored? The reason for selecting this option is that the backup drive is being attached to the Server
4. Click on Select Backup Location and specify appropriate path for backup drive attached to the Server in the Backup location: field
5. Click on Select Server and specify the name of the Server under Please select which server’s data you would like to recover
6. Click on Select Backup Date and specify date as well as time from which database and transaction log files need to be restored. Click on Recoverable items:

i. In the window that appears, it is recommended to select Files and Folders while working with recovery databases.
Note: For Exchange Database Recovery, DBAs usually select Applications instead under ‘What do you want to recover?’ section

ii. The list of available files will be displayed in a tree view. Select the database and log files that need to be recovered. Here, it is important to note that if the database and associated log files stored in a separate folder, different restore jobs needs to be initiated

iii. Next, restore the database and log files to the location that was earlier specified while creating the recovery database. Select the appropriate option from the Original location and Another location. Under When this wizard finds items in the backup that are already in the recovery destination section, it is recommended to select Create copies so that you have both versions option. Under Security Settings section, make sure that the checkbox available with Restore access control list (ACL) permissions to the file or folder being recovered is selected

7. Click on Recover to start the restore procedure
Once the restore database from windows server backup and log files is complete, the next task is to make recovered database mountable.

Step #3: Run Mailbox Restore Request in Exchange Server 2016
After the restore and mount process for recovery database is accomplished successfully, the next step is to execute one or more mailbox restore request for retrieving data. ‘Get-MailboxStatistics’ will help detect the mailboxes that are stored within the recovery database. The following is the example cmdlet:

“Get-MailboxStatistics -Database <RDBName> | ft –auto”

There are different restore tasks that can be performed on the recovery database. These include:

• Restore mailbox to production mailbox
• Restore mailbox into archive mailbox
• Restore mailbox to different mailbox
• Restore selected folders from mailbox
• Exclude folders from Restore request

Example:

The following cmdlet can be executed to restore source mailbox or folders from the Recovery database to the production mailbox.

“MailboxRestoreRequest -SourceDatabase DB01 -SourceStoreMailbox 1d20855f-fd54-4681-98e6-e249f5795ddd -TargetMailbox George”

The following cmdlet will restore the items of source mailbox with display name George Williams on mailbox database DB01 to archive mailbox.

“New-MaiboxRestoreRequest -SourceDatabase DB01 -SourceStoreMailbox “George Williams” –Target’Mailbox George@mailtest.com –TargetIsArchive”

After the status for mailbox restore request is completed, remove the restore request using the following cmdlet.

“Get-MailboxRestoreRequest -Status Completed | Remove-MailboxRestoreResquest”

Step #4: Remove The Recovery Database
Once the process to restore the Exchange database and log files is successfully accomplished, the last step is to remove the recovery database from Exchange Server 2016. To do this, it is required to dismount the database first. Then, remove the database and delete all associated files from the file system. This will help reclaim the storage space on the disk.

The entire procedure to restore the mailbox from the recovery database in Exchange Server 2016 is complicated and demands a thorough knowledge of PowerShell cmdlets. Apart from this, a single mistake while executing the cmdlets can lead to data loss or even deletion of mailboxes. For simple and error-free recovery of mailboxes and mailbox items, DBAs recommend Stellar Repair for Exchange software.

Conclusion
The end to end process for restoring mailbox items or the entire mailbox using recovery database in Exchange Server 2016 has been given. Since different organizations have their own specifications and preferences, it is recommended to perform the task to restore mailbox database using the recovery database.

Comments(14)
  1. Stephen March 24, 2020
    • Eric Simson April 9, 2020
  2. Pete June 21, 2018
    • Eric Simson June 22, 2018
  3. Scott March 27, 2018
    • Eric Simson March 28, 2018
  4. David October 26, 2017
    • Eric Simson October 27, 2017
  5. Aslam July 13, 2017
    • Eric Simson July 14, 2017
  6. Ethan June 20, 2017
    • Eric Simson June 22, 2017
  7. Linda Shortridge May 19, 2017
    • Eric Simson May 22, 2017

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.