How to Restore Exchange Database

Written by

An Exchange Server holds data in databases (EDB files). The EDB files, which are proprietary of Microsoft, are accompanied by transaction logs. Although the server and its configuration are important, the database is the most important thing. In case of a disaster, the server can be rebuilt but if data is lost, the company can lose business and even more. There are several reasons for Exchange database corruption. Here are the most common ones:

Common Causes of Database Corruption

  • Sudden power failure.
  • Hardware issues.
  • Third-party software has locked or stopped the database or transaction logs from working.
  • Malware, virus infection, or other malicious attacks.
  • Updates on the server which are either interrupted or gone wrong.
  • Human errors.

If database gets corrupted, you need to restore it as soon as possible to avoid downtime. In this article, we will see how to restore Exchange Server database.

Types of Restoration Levels

In case of database corruption or any other issue, the first and basic step is to restore the database from the last healthy backup. But before restoring from the backup, you need to understand the levels. There are three levels - Mailbox, Database, and Server.

Mailbox Level

When you need to restore a particular mailbox or an item from a mailbox, you need to have the backup application that can restore the items directly to the original location. This would work only if the backup software had granular backup.

Database Level

If there is corruption or an issue with the whole mailbox database, the backup software can restore the entire database.

Server Level

This is a more drastic approach because this would restore the entire server machine. This is used when the operating system is totally unusable. In such cases, you can restore to another server. This is to ensure that the original server is not touched or modified in case you need to go back or extract data from it.

Step-by-Step Guide to Restoring an Exchange Database

1. Verify Backup Validity

Before proceeding with the restore, you need to check that the backup is in good state. This will ensure that you will not encounter any surprises when restoring from it.

2. Prepare for Restoration

If you are restoring at an item level, you don’t need much resources. However, when it comes to restoring the entire database or the whole server, you must consider if the infrastructure can withstand the restore. If you are restoring a 200 GB database on your existing server, you must ensure that there is enough storage and the memory on the server. If you need to restore a different server (a virtual machine), you must also consider the same resources and that the virtual infrastructure can operate with this extra compute resources.

3. Restore the Database

Depending on the backup type, you can restore the full backup or the latest full backup and subsequent incremental backups. When restoring Exchange database from the backup, you need to also restore the related transaction logs from the previous backups. Transaction logs are important as these hold temporary information and data, before being committed to the database. Failure to do so can result in an unusable database.

4. Mount the Database

After the database recovery is complete (in case of a mailbox database restore), you need to mount the restored database. Before mounting the database, you need to assign the required role to the user account you will be using to perform the database mount operation. To assign the role to the user, use the New-ManagementRoleAssignment command in PowerShell. Then, determine the state of the database by using Eseutil /mh command. If the state is shown as Clean Shutdown, then you can proceed to mount the database. This can be done from the Exchange Admin Center (EAC) or via PowerShell using the Mount-Database command in the Exchange Management Shell (EMS).

5. Perform Checks

After database restore, in the case of a granular restore, it is important to get a confirmation by the users that the correct data has been restored. In the case of a full mailbox or database restore, it is suggested to check that the users’ Outlook profiles are working as they should be. Perform a full test on the mail flow and also check the permissions. After recovery, it is always suggested to perform a comprehensive check on the restored database's health as a precaution.

To Conclude

Having a backup doesn’t mean that it can be used. There could be issues such as mismatched log files, incomplete or failed backups, and even corrupted backups. In such cases, you can only rely on the current data in hand. You can use applications, such as Stellar Repair for Exchange to repair the corrupt database and restore the data. With this application, you can easily open any version of database, with no size limit. The application can open corrupt EDB files with no issues and can export data from the files directly to a live Exchange Server or Office 365. This helps you to restore database in minimum downtime and without any data loss.

Brought to you by

What’s hot on Infosecurity Magazine?