Email Repair

How Do I Restore an Exchange Database?

Author: Ravi Singh | Updated on April 16, 2021 | Email Repair | Repair Exchange Database | 5 min read

Summary: In this article, we’ve discussed the reasons that may require you to restore Exchange database. We’ve mentioned the detailed procedure for restoring Exchange database from backup using Windows Server Backup. Also, you’ll find about an Exchange recovery software that can help you restore Exchange database of any Exchange Server version in a few clicks.


Free Download For Windows

There are various ways to restore an Exchange Server database and various media to restore from. You can take a full backup of the database to local storage, cloud storage, or network devices. Backup can be taken in full or granularly.

Things to keep in mind while backing up Exchange Server:

  • Ensure that the backup application you are using is compatible with the Exchange Server version you have installed
  • Restoring the whole virtual machine is an issue as snapshots of Exchange Server are not supported
  • When restoring, you need to factor in extra resources and administrative effort required in the operation
  • When restoring the day after, it is to be noted that the data between the backup will be lost

Why would you need to restore Exchange database?

You would need to restore an Exchange Server database due to various reasons. Some common ones are:

  • Hardware failure
  • Malware infection or Ransomware attack
  • Software issues
  • Lost emails, historic data, or deleted mailboxes

You need to go for restoring an Exchange Server database when there is no way back or no way in recovering from failures or corruption of data.

Restoring Exchange Database

Let’s start with restoring the mailbox database from the backup device.

Note: In this article, we are going to restore Exchange database from backup using Windows Server Backup.

Open the Windows Server Backup. After opening the Windows Server Backup, select the day to restore. Then, follow the wizard until you see the Select Recovery Type screen. In this screen, select Application. In the next window, you will see a list of all the applications that Windows Server Backup is aware of.

Application Aware restore from Windows Server Backup

Application Aware restore from Windows Server Backup

You need to make sure that the application is compatible and aware of Exchange Server. If you do not see the Exchange in the list, it means that there is misconfiguration in your backup software and you will be only able to perform a file level restore.

Note: When restoring an Exchange Server database, you need to make sure that there is ample space in your hard drive.

In the next screen, select the Recover to another location option, if you are restoring a mailbox or mail items from the backup. If you are restoring the entire database, select the Recover to original location option.

Recovery to original or another location

Recovery to original or another location

After the Exchange restore is complete, you will notice that the destination is populated with the same folder structure. However, even if it is successful, you still cannot use the mailbox database.

Restored database from backup

Restored database from backup

It is to be noted that when you recover a mailbox database from backup, it will be in a Dirty Shutdown state and will not mount until it is fixed. To confirm the state, you can use EseUtil with the /mh switch.

EseUtil /mh showing database state in Dirty Shutdown

EseUtil /mh showing database state in Dirty Shutdown

By using EseUtil, you can recover the database and then be able to mount it. EseUtil has two methods of recovery – soft recovery and hard recovery. First, you can perform the soft recovery by using the eseutil/r switch.

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

EseUtil Soft Recovery

EseUtil Soft Recovery                           

The recovery process may take some time, depending on the size of the database. After the recovery is complete, you need to run the EseUtil with the /mh switch to confirm that the database is in Clean Shutdown. If the database is still in Dirty Shutdown, you need to run the hard recovery. You need to know that this process will wipe any data which is deemed as corrupted and there is no guarantee that this will fix the problem.

If you’ve recovered the database to its original location, you can go ahead and mount the database. The users can now access their mailbox. However, as mentioned earlier, they will lose all the data between the backup and the crash.

If you have restored Exchange database from backup to recover an email or mailbox, you need to create a Recovery Database (RDB). Once the database is restored to another location and its state is in Clean Shutdown, run the below command in the Exchange Management Shell (EMS) to attach the database.

New-MailboxDatabase –Name RecoveryDB –Server EX01 –EdbFilePath

Create a new recovery database (RDB)

Create a new recovery database (RDB)

When you run the above command, you will get two warnings:

  • The database must be in Clean Shutdown before use.
  • Restart the Information Store for the changes to take effect.

While running the Get-MailboxDatabase, ensure that the Exchange Recovery Database is mounted and available.

Get-MailboxDatabase


When you have restarted the Information Store Service, you will be able to export the mailboxes to PST by using the New-MailboxExportRequest PowerShell cmdlet.

Conclusion

As you can see, restoring a mailbox database could take a lot of time and resources. Sometimes, you need to go through all this trouble to restore a single mailbox. Apart from this, you need to take into consideration that the database is not portable and the Exchange Server must be online to restore a mailbox.

However, you can do this in much less time and without any hassle by using an Exchange database recovery software such as Stellar Repair for Exchange. You can easily open any Exchange Database (EDB) of any Exchange Server version from 2007 to 2019, with a few clicks. The application allows you to granularly export emails, data, public folders, and whole mailboxes to PST and other formats. You can also use the application to export directly to a live Exchange Server database or Office 365 tenant.

76% of people found this article helpful