Email Repair

How to Create Recovery Database in Exchange Server?

Author: Ravi Singh | Updated on October 29, 2020 | Email Repair | Repair Exchange Database | 8 min read

Summary : A Recovery Database (RDB) helps Exchange administrators mount a copy of the mailbox database and restore mailboxes or data. It is used to restore mailboxes or mailbox items that are lost from the original database. In this article, we have discussed the Recovery Database (RDB), its characteristics, and its uses in Exchange recovery operations. Plus, you will learn the process to create a Recovery Database and restore lost, deleted, or corrupt mailbox items in Exchange by using RDB.



In Microsoft Exchange, a Recovery Database or RDB is a unique database, which is used to mount and extract mailboxes or mailbox items from a restored database as a part of a disaster recovery operation. An Exchange admin can export the extracted data from RDB to a folder or merge it into an existing mailbox. However, unlike the Standard database, the RDB is accessible by Exchange administrators only and can’t be accessed by end-users through any application, email clients, such as Outlook, or device. Also, it enables admins to recover data from the available backup or copy of the database without obstructing user access to mailboxes and data.

IMPORTANT NOTE: If the backup isn’t available or found obsolete, you can install Stellar Repair for Exchange to recover mailboxes and mailbox items in a few clicks. It scans the existing database and helps you restore missing mailboxes and data, even if the original database is damaged or corrupt.

Free download

Difference Between Standard Database and Recovery Database

The following are the key differences between the Recovery Database and Standard Exchange database.

 

Standard Database

Recovery Database

1.

It stores user mailboxes

It restores lost mailboxes and mailbox items

2.

Users can access their mailboxes stored in the Standard Exchange database

End-users can’t connect to their mailboxes in Recovery Database

3.

It is used to send/receive messages

It can’t send/receive messages

4.

Created via Exchange Admin Center (EAC) and PowerShell commands

Created by using Exchange Management Shell (EMS)

5.

Online maintenance can be performed on the Standard database

Online maintenance is not performed for RDBs

6.

Database copies can be created

You can’t create mailbox database copies of RDB

 

How to Use the Recovery Database?

There are a few requirements that must be met before you can run or use the Recovery Database.

  1. You can run RDB on mailboxes created by Exchange 2016 and later versions only
  2. Mailbox database from Exchange 2013 and previous Exchange versions is not supported
  3. The Active Directory Forest should be the same for extracting and merging the data
  4. The logical information related to original mailbox database and mailboxes in the database must be intact in Active Directory
  5. Restored database backup

Besides these requirements, the following are the situations where RDB is used for mailbox and Exchange database recovery,

  1. Dial Tone Recovery

You can use RDB to perform recovery after the original database is restored via backup as a part of dial-tone recovery. This can be done on the same server or you may host the dial tone database on an alternate server and then recover data from RDB.

  1. Mailbox Recovery

You can use RDB to recover individual mailboxes from backup after the mailbox retention period ends. You can either extract the mailbox to a folder or merge the extracted data to an existing mailbox on the server.

  1. Specific Mailbox Item Recovery

You may also restore accidentally deleted individual mailbox items from the mailbox database. 

IMPORTANT NOTE: RDBs cannot be used to restore an Exchange server or multiple databases. Also, it can’t be used for Public Folder recovery. It can only be used for restoring individual database, mailboxes, and mailbox items.

Steps to Create and Use Recovery Database on Exchange Server

You can use the New-MailboxDatabase PowerShell cmdlet to create a recovery database (RDB) in Exchange. Following are the steps to create and use a Recovery Database for restoring mailboxes and mailbox items in Exchange.  

Step 1: Restore Database from Backup

First, you need to restore the database from the backup. For demonstration purpose, we will use the Windows Server Backup to restore the most recent database backup. So, if you have created a database backup by using Windows Server Backup, you may follow these steps to restore the backup version stored on the same server or another location.

The steps are as follows,

  • Open Windows Server Backup and click on Recovery
  • Choose the location where database backup is stored. If the backup is stored on the same server as the database, choose ‘This server (SERVERNAME)’ option. If it’s on another server or storage location, choose ‘A backup stored on another location’ and click ‘Next’

windows server backup

  • Select the most recent backup data and time. The backup date should be highlighted in bold.

select a date

  • Now choose the option Files and Folders to restore the database and log files

select files and folders

  • From the list, choose the database and log files that you want to restore for RDB

NOTE: If the .edb and .log files are saved at the same location, no further action is required. But if they are located at different locations, you need to restore them in two separate processes.

  • Select a location where you want to restore the database and log files backup. You may choose the original location if you know it or save it at another location

save rdb to a loaction

  • Confirm and then enter required admin credentials
  • Finally, click on the Recover button to start the database restore process

Step 2: Check Database State

Now that the EDB and LOG files are restored from the backup, check the database status by using the following command in Command Prompt window.

Eseutil /mh 

It must be in a Dirty Shutdown state. Thus, you can’t mount it directly. To bring it into the Clean Shutdown state, you need to attempt Soft Recovery to replay the transaction log files. The command is as follows,

Eseutil /r E01 /l “C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Logs” /d “C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\RestoredDatabase.edb” /i

After Soft Recovery, check the state of the database again by using the following command,

Eseutil /mh 

IMPORTANT NOTE: If the Soft Recovery fails to bring the database to a consistent or Clean Shutdown state, you may use the Hard Recovery. However, Hard Recovery is risky and can lead to data loss. The command for performing Hard Recovery is as follows,

ESEUTIL /P 

Step 3: Create a Recovery Database

Now that the database is restored from backup and is in the Clean Shutdown state, you can use the New-MailboxDatabase cmdlet to create a recovery database (RDB).

The syntax is as follows,

New-MailboxDatabase -Server Stellar -Name RDB01 -Recovery -EdbFilePath “C:\Recovery\RDB01.EDB" -LogFolderPath "C:\Recovery\RDB01"

Step 4: Check If RDB is Created

To verify that you've successfully created a recovery database, run the following command in EMS to check the configuration information of the recovery database.

Get-MailboxDatabase  | Format-List

The output should display the Recovery Database in the list.

Step 5: Mount RDB on Server

Now that the RDB is created, you can mount the Recovery Database by using the following command,

Mount-Database RDB01

To check if the Recovery Database is successfully mounted, run the following command,

Get-MailboxDatabase -Status| Format-List name, server, mounted -AutoSize
check status of database

Step 6: Extract Data from the Recovery Database

Once the RDB is successfully mounted, you can extract the data from it and then save it in a folder or merge with an existing mailbox without disconnecting the user or disturbing the mailbox or database. The steps are as follows,

  1. Check the mailboxes in RDB by using the following EMS command,
Get-MailboxRestoreRequest -Database ‘RDBName’
  1. To restore mailbox or mailbox items from RDB, find and note the GUID name of mailboxes by using the following EMS command,
Get-MailboxStatistics -Database ‘RDBName’ | Format-List DisplayName, mailboxGUID
  1. Now you can restore mailbox or mailbox items from RDB by using the GUID name of the mailbox on the source server and alias name of the mailbox on the target server. The command is as follows,
New-MailboxRestoreRequest -Name “StellarInfo1” -SourceDatabase ‘RDBName’ -SourceStoreMailbox MailboxGUID -TargetMailbox “StellarInfo2”TargetMailboxAlias -AllowLegacyDNSMismatch

After executing the above command, you can restore the mailbox and mailbox data from Recovery Database to the original mailbox.

  1. You may also restore the mailbox to the Archive mailbox by using -TargetIsArchive The command is as follows,
New-MailboxRestoreRequest -SourceDatabase RDBName -SourceStoreMailbox "StellarInfo1" -TargetMailbox "StellarInfo2" -TargetIsArchive
  1. You can also extract a specific folder from the mailbox by using -IncludeFolders The command is as follows,
New-MailboxRestoreRequest -SourceDatabase RDBName -SourceStoreMailbox "StellarInfo1" -TargetMailbox "StellarInfo2” -IncludeFolders "Inbox"
  1. You may also include all subfolders by using subfolder /* at the end of the folder name. For instance,
New-MailboxRestoreRequest -SourceDatabase RDBName -SourceStoreMailbox "StellarInfo1" -TargetMailbox "StellarInfo2” -IncludeFolders "Inbox/*"
  1. Additionally, you can also exclude folders by using the ExcludeFolders
New-MailboxRestoreRequest -SourceDatabase RDBName -SourceStoreMailbox "StellarInfo1" -TargetMailbox "StellarInfo2" -ExcludeFolders "#Drafts#","#DeletedItems#"

Step 7: Check Status of Mailbox Restore Requests

Sometimes, mailbox restore requests may fail or get stuck. Thus, after creating a mailbox restore request, you must check the status of the request. The command is as follows,

Get-MailboxRestoreRequest

Step 8: Remove Mailbox Restore Requests

Once the mailbox or mailbox items are restored, you must manually remove the mailbox restore requests. If you don’t do this, the requests will remain active until manually removed.

Conclusion

A Recovery Database is a part of disaster recovery in Exchange that helps restore missing mailboxes and mailbox items after the retention period is elapsed. However, it requires database backup and multiple steps to complete. Also, you cannot use it to recover a failed Exchange server, mailboxes from a damaged Exchange database (EDB), or multiple databases.

For such cases and in the absence of a backup, you can rely on third-party software such as Stellar Repair for Exchange. This Exchange recovery software helps you extract mailboxes from the damaged, corrupt, or inaccessible Exchange mailbox database (EDB) file and saves them as PST. It does not require any database backup, log files, or additional permissions to work. You can also export the extracted mailboxes and mailbox data, including Public Folders, directly to mailboxes on the live Exchange server.

 

76% of people found this article helpful