Read Time: 8 minutes

Summary: Restore database in Exchange Server allows easy recovery of data from a corrupt database. Administrators usually utilize it to access Exchange Sever while actual database is under restore. This article walks you through the easy process of Exchange mailbox restore including manual approaches using Exchange Management Shell for soft as well as hard deleted Exchange mailboxes and use of a professional tool.

Restoring mailbox databases from Exchange 2016 can be very challenging if you don’t have backups or copies of the mailbox database. Usually, not every user possesses technical knowledge or is capable of restoring a mailbox database in Exchange Server. To restore a deleted Exchange database to its original condition you require in-depth knowledge of Exchange features and retention policies. However, Microsoft offers a reliable facility to restore mailboxes from Exchange Server 2016 and 2019 database.

What is Restore Exchange Database?

Virus attacks, hardware failure, human errors, accidental data deletion, corruption, etc., reasons like these can make your data inaccessible. If such a situation is not treated at the right time, it will cause severe communication downtime and may even lead to financial loss to an organization or individual.

Restore Exchange database is the best solution to avoid such scenarios. To help with easy data retrieval, organization creates and uses a Recovery Database (RDB). It is a unique database that enables users to mount the restored mailbox database and extract data from it as a part of a recovery operation. With RDB, you can restore mailboxes from a backup or a copy of the database without interrupting user access to the data.

Why to Restore Exchange Mailboxes from RDB?

Here are some offered benefits of restoring mailboxes in Exchange Server 2016 and 2019 using a recovery database:

  • Helps to restore lost mailboxes and their items without affecting the live database.
  • Can restore the mailbox to the original mailbox or different mailbox.
  • Allows to restore all mailboxes or specific user mailboxes.
  • Having a RDB can help with legal compliance and audits.

However, you cannot just simply copy-paste or drag & drop the database items from RDB for data restoration. You’ll have to use the New-MailboxRestoreRequest cmdlet to extract data from the recovery database. After retrieving the data, you can restore it to the existing mailbox or a new folder.

Pre-requisites for Mailbox Restore using RDB

Before starting the Exchange mailbox restore process with RDB, there are some things that you need to know:

  • You need Organization Management permissions to perform this procedure.
  • The database and log files with recovered mailboxes must be copied or restored to the RDB folder structure.
  • Run mailbox restore requests.
  • You might have to use Eseutil /R to restore databases in a clean shutdown state.
  • Once database restore is done, remove the database if it’s not in use.

After knowing these things, you can use Exchange Management Shell to restore the data using the RDB.

How to Restore Exchange Mailboxes?

Go through the sections below to see how you can restore mailboxes in Exchange Server.

Restore Soft Deleted User Mailboxes

Soft deleted mailboxes in Exchange are the ones that have been removed from the database, but it is still in the recycle bin and under the retention period of 30 days. You can restore the mailbox items from the bin within these 30 days, after which the data will be removed completely from the server. Here is the process to get deleted mailbox using PowerShell scripting:

Step 1. Open Windows PowerShell as an administrator.

Step 2. Run the Undo-SoftDeletedMailbox cmdlet to undo the deletion of the mailboxes that are still in the recycle bin.

You can also run the following cmdlet to restore the mailboxes:

Step 1. Connect to Exchange Online PowerShell and run the following cmdlet to identify the soft deleted mailbox.

Get-Mailbox -SoftDeletedMailbox | Select-Object Name,ExchangeGuid

Step 2. Create a target mailbox where you want to restore these mailbox items

Get-Mailbox -Identity <NameOrAliasOfNewTargetMailbox> | Format-List ExchangeGuid

Step 3. In the following cmdlet, replace the “SoftDeletedMailboxGUID” with the GUID retrieved in step 1.

New-MailboxRestoreRequest -SourceMailbox <SoftDeletedMailboxGUID> -TargetMailbox <NewTargetMailboxGUID>

With this, you have restored your soft deleted mailbox items to a new Exchange mailbox.

Restore Hard Deleted User Mailboxes

Hard deleted mailbox is a permanently deleted user mailbox whose retention period (30 days) is over and cannot be restored. Any mailbox that gets deleted permanently becomes inactive. Let’s see what are the ways with which we can restore a hard-deleted mailbox.

Step 1. Run the following command in Exchange Online PowerShell to get the list of inactive mailboxes:

Get-Mailbox -InactiveMailboxOnly -ResultSize Unlimited | FT DisplayName,PrimarySMTPAddress,WhenSoftDeleted

Step 2. Create a new variable which has properties similar to the inactive mailbox.

$inactiveMailbox = Get-Mailbox -InactiveMailboxOnly -Identity <identity of inactive mailbox>

Step 3. Show LegacyExchangeDN of the inactive mailbox to add it as a proxy address for the destination mailbox.

$inactiveMailbox.LegacyExchangeDN

Step 4. Add the X500 proxy address to the LegacyExchangeDN

Step 5. With the following cmdlet, all the contents of inactive mailbox will be moved to the target mailbox.

New-MailboxRestoreRequest -SourceMailbox $inactiveMailbox.DistinguishedName -TargetMailbox <identity of target mailbox>

You can use this process to restore hard deleted mailbox. However, the process is quite complicated especially if you are a non-technical Exchange Server user. To avoid making errors, you can use a professional tool to restore mailboxes to the Exchange database.

Exchange Management Shell to Restore Mailboxes using the RDB

Follow the below steps to restore deleted mailbox data using RDB:

Step 1. Copy the recovered database and its log files to the location that you’ll use for the RDB.

Step 2. Now, use Eseutil to put the recovered database in a clean shutdown state:

Eseutil /R Exx /l <RDBLogFilePath> /d <RDBEdbFolder>

Step 3. Create the RDB and give a unique name to it. Use the name of the database file for the EdbFilePath parameter and the location for the LogFolderPath parameter.

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

Step 4. Now, restart the Microsoft Exchange Information store service with the following command:

Restart-Service MSExchangeIS

Step 5. Mount the RDB using the below command:

Mount-database <RDBName>

Step 6. Using the below command, verify whether the mounted database contains the mailbox you want to restore or not:

Get-MailboxStatistics -Database <RDBName> | Format-Table -auto

Step 7. After verifying the restored mailboxes, use the New-MailboxRestoreRequest cmdlet to restore the mailbox to the production mailbox. You can use the below command to perform this action:

New-MailboxRestoreRequest -SourceDatabase -<Database Name> -SourceStoreMailbox -<MaiboxGUID> -TargetMailbox -<MailboxName>

Step 8. You can check the status of mailbox restore using Get-MailboxRestoreRequest. When the restore process is complete, remove the restore request with Remove-MailboxRestoreRequest.

Using this technique, you can restore Exchange mailboxes stored within the database of Exchange Server. But the steps involved in this manual process are very complicated. First, you’ll have to create an RDB, restore the database, and then use a cmdlet to extract data from it. There is no assurance that you get deleted mailbox without any data loss.

The retrieved file might have some of the emails or other data missing or inaccessible. In situations when you are in dilemma to find a reliable mailbox restore method, we suggest you use a professional tool.

Conclusion

Restoring mailboxes from Exchange database can be daunting especially if you don’t know the exact process to recover the mailboxes. One cannot completely rely on the manual approach because it demands technical knowledge and have the tendency to cause potential data loss. You can use a third-party Exchange Mailbox Recovery software to effortlessly retrieve Exchange 2016 mailboxes. One of the top-rated software that streamlines the process to retrieve deleted mailboxes from the database.

Kernel for Exchange Server
Related Posts