Restore Data Using A Recovery Database In Exchange Server

In Microsoft Exchange, you have the option of creating a recovery database that can be used to restore mailbox items without disrupting current data.  The recovery database is a special kind of mailbox database that can be useful in recovery operation when you lose some important mailbox items due to unexpected reasons.

If you have created a recovery database (RDB) you can restore data by using an automated application or copy the database and its log files in the RDB folder structure.  In this blog, we have discussed different ways of recovering data from an RDB to perform minimal impact Exchange database recovery.

Before we move on to the critical process of Exchange recovery, let’s look at some important things that will increase your chances of success.  

Things to keep in mind when restoring data using a recovery database in Exchange server

  • You need to ensure the backup application you are using is compatible with the Exchange server version you have installed.
  • The Exchange server does not support whole virtual machine restoration with snapshots of Exchange server
  • The data created or generated between the last exchange database backup and the time of restoration is lost.

Reasons to restore recovery database

The administrator could need to restore recovery database for any one following reasons:

  • Malware infection or ransomware attack
  • Hardware issues or failure 
  • Software issues
  • Deleted mailboxes, lost emails, or historical data,
  • Database corruption or damage
  • Server failure

Steps to restore Exchange Server Database

Here are the steps you need to follow for Exchange database recovery using the Windows backup service:

  1. Open Windows Server Backup
  2. Next, select the day to restore.
  3. You need to follow the wizard until you reach the Select Recovery Type screen
  4. In this screen, choose Application
  • In the next step, you will see the complete list of all applications that Windows Server Backup is aware of

Important Tip: As mentioned earlier, the backup application should be compatible with the Exchange server. If you do not see your application in the list, there is some misconfiguration in the backup software. In that scenario, you can only perform a file level restore.  Also, make sure you have sufficient space on your hard drive when restoring an Exchange server database.

  • In the next step, select the Recover to another location option – if you are restoring a mailbox or mailbox items from the backup.
  • If you want to restore the entire database backup, you need to select Recover to the original location.
  • After the Exchange database is restored, you will see the destination is populated with the same folder structure.  Even after the successful Exchange recovery, you cannot use the mailbox database right away.

The reason is when you recover a database from backup; it will be in a dirty shutdown state. In simple terms, the database is the state of incomplete transactions that have not been committed to the database file due to missing log files, Exchange server shutdown or EDB file corruption.  To check the Exchange database status, you need to run EseUtil with the /mh switch.

Using EseUtil

EseUtil stands for Exchange extensible storage engine utility. It is a command-line tool used to repair corrupt, damaged or inconsistent Exchange server databases.  For example, the following command will show the dirty shutdown state of the recovered database:

Open command prompt with administrator rights and type the following command

eseutil /mh databasepath dbname.edb=”” /databasepath

By using EseUtil, you can recover the database to Clean Shutdown state.  Then you can use the Mount-Database cmdlet in Exchange Management Shell (EMS) or Exchange Admin Center (EAC) to mount the database. EseUtil offers two recovery methods- Soft Recovery and Hard Recovery. Here we opt to perform a soft recovery by using the eseutil/r switch. 

Next, go back to the command prompt window and type the following command. 

ESEUTIL /R E00 /d /I /L “E:\RecoverDB\MBX\LogFiles”

Note: the recovery process may take time depending on the size of the database.  After exchange recovery is complete, you need to run the EseUtil with the /mh switch to confirm the database is in the Clean Shutdown state.  If the command result still shows the database is in a Dirty Shutdown state, you need to run the hard recovery commands.  

If the EseUtil with the /mh switch confirms the database is in the Clean Shutdown state you can go ahead and mount the database. You need to use ExchangePowershell to mount the recovered database.

Here are the steps to follow:

  1. Launch Exchange Powershell
  2. Type the following command in the Powershell window
  3. Mount-Database -Identity ExchangeServer1.Contoso.com\MyDatabase

Note: The above command mounts the database MyDatabase. The Mount-Database cmdlet will mount the database only if the Microsoft Exchange Replication service and Microsoft Exchange Information Store service are running.

Using Hard Recovery

If the EseUtil Soft recovery has not worked, you need to use the hard recovery option to restore data using a recovery database in Exchange server. 

Here is the syntax for using EseUtil Hard Recovery to recover corrupt database:

Syntax – ESEUTIL /P <path_to_the_database>

In the ExchangePowershell window, type the following command

Eseutil /p C:\program Files\ExchSrvr\MyDB.edb

After performing hard recovery, you need to check the integrity of the database using the following command

Isinteg –s <server_name> -fix –test alltests

Limitations of Soft Recovery and Hard Recovery

Experts mention that Soft Recovery and Hard Recovery may not always work, especially in cases of severe corruption of data.  In that scenario, there is also risk of data loss and further damage to the exchange database.

The best option for Exchange database recovery in such cases is using specialized data recovery tools features a graphical user interface that makes the whole process easy and the software can help recover databases from corrupt or damaged EDB files to PST, MSG, EML, RTF, HTML, and PDF formats.

Let’s look at the procedure of restoring data with Stellar software using a recovery database in the Exchange server.

Using Stellar Repair for Exchange 

  1. Download
  2. Install the software with default options.
  3. From the home screen for exchange software, click Browse to choose EDB file. If you don’t know the location of the EDB file, you can click the Find button. If the database size is large, change the “Temp Path”
  • In the next screen, you will see all EDB file stored in the selected volume, folder, or sub-folder.
  • Next, you will see two options, Quick Scan and Extensive Scan. The Quick Scan option is the fast mode to scan and repair corrupt EDB file while the Extensive Scan option is useful to scan severely corrupt EDB files for better results.
  • Wait for the scanning to complete. After the scanning process is complete, the software will list all recoverable mailboxes from the scanned EDB file. You can view it in the left pane. Also, you can preview and select specific or all mailbox items you wish to recover.
  • Next, select Export to Live Exchange option from the Save As options. Click Next to export recovered mailboxes to the live exchange server.
  • In the next screen, select the Outlook profile with administrator privileges.  Enter the password and provide details of the Domain Controller where AD is installed. Then click Next to export recovered mailboxes to the destination server.
  • The software will automatically map user’s mailboxes on the destination exchange or Office 365 server. The tool also provides the user with the option to manually map mailboxes, create mailbox or apply filters before export.
  • In the Save dialog box, you will find the queued mailboxes.  You can remove any mailboxes that you don’t want to restore. All you have to do is click on the Remove button besides pending mailboxes which will stop the software from repairing them.  If you want to terminate the recovery process, click on Stop All
  • In the next step, you can see a Process Complete dialog box that displays export summary.  Click OK to close the dialog box.  The Process Complete dialog box also provides an option to Resume saving mailboxes, if you had removed any pending mailboxes during export.

Conclusion

Exchange administrators can use EseUtil to manage the exchange database and keep a tab on the database health. If the database gets corrupted, they can use EseUtil soft recovery or hard recovery to restore data from the exchange server. However, they should know using EseUtil is a lengthy and time consuming process and there is a hidden risk of data loss and further corruption of data. Using tools like not only saves time but also helps avert risks of further corruption of the data.

Author Profile

Lee Clarke
Lee Clarke
Business And Features Writer

Email https://markmeets.com/contact-form/

Leave a Reply