Image2

Exchange server is the backbone of any organization’s communication infrastructure. A total failure in the Exchange server due to a disaster will disrupt the email communication, downtime and productivity loss. Additionally, the Exchange database contains critical data, like emails, calendars, and contacts. If the server is not recovered, it results in permanent data loss, therefore it is important to recover the Exchange sever after a total failure.

To recover the Exchange server you need run the Microsoft Exchange Server Setup with the /m:RecoverServer. This switch will recover information and settings of the server that is lost. However, this process is complicated and can cause permanent data loss if not performed properly. Ensure the following before you start the recovery process:

  • The account you are using to perform the server recover has the following permissions:
    • Domain Admins security group membership.
    • Exchange Organization Management role group membership.
  • The system on which the server is being recovered should have the same CU as the system on which the previous server was hosted. If the new system has older updates, the server after recovery will have the UI of the older version.
  • The target server must use the same version of Windows Server as the lost server.
  • The target server should have the same general performance characteristics and hardware configuration as the lost server.

Once you have ensured that all these prerequisites have been fulfilled, use the steps given below to recover the Exchange server.

Steps to Recover Exchange Server after Total Failure

Follow the detailed steps to recover the Exchange server after a total failure.

  1. Reset the Computer account by using Windows Interface or Command Line
  2. Install an operating system and name the server. Ensure that you are using the same name for the server as that of the failed server. If the names are different, the process will fail.
  3. Join the server to the same domain as the lost server.
  4. Install the required operating system components on the target server.
  5. On the target server, open File Explorer, right-click on the Exchange ISO image file that you downloaded, and then select Mount.
  6. Run the following command on the the command prompt:

<Virtual DVD drive letter>:Setup.exe /IAcceptExchangeServerLicenseTerms_DiagnosticDataON /Mode:RecoverServer [/TargetDir:<Path>] [/DomainController:<ServerNameOrFQDN>] [/DoNotStartTransport] [/EnableErrorReporting]

Replace the placeholders with the desired values in the above prompt. You can use additional switches with the prompt.

  1. After Setup has completed, but before you put the recovered server into production, reconfigure any custom settings that were previously present on the server, and then restart the server.

At this point, the lost Exchange server is recovered with the exact same information and configuration. Now you need to recover all the users’ data on the server. Use one of the methods mentioned below to recover the database of the old server on the recovered server:

How to Recover the Database

If you have a backup of the server up to the time it became inaccessible, you can use recovery databases to recover the database from the backup. This process uses recovery databases to first extract the data from a healthy backup and store it in a recovery database (RDB). Then the data in the RDB is exported as a PST file using New-MailboxExportRequest cmdlet.

Image1

After extraction, the data can be exported to a folder or merged into an existing mailbox. However, this method can fail if the backup is not healthy or compatible. Also, If the last backup was made a long time before the server got failed, the data stored in the database after the backup will be lost.

The next step is to mount the recovered database on the server using Mount-Database cmdlet. However, before mounting the database, you need to ensure if it in a consistent state or not. Follow the steps given below to check the consistency of the database and perform database repair if needed:

  1. To confirm the state of the recovered database, use the Eseutil /mh command and check the State Field of the output.
  2. If the output displays Dirty Shutdown, perform Soft Recovery process using Eseutil  /r and check the state again.
  3. If it is still in Dirty Shutdown, perform Hard Recovery process using Eseutil /p to make the database consistent.

However, this process is time consuming and any error may cause permanent data loss. Additionally there are a number of drawbacks of using eseutil /p like:

  • There is no guarantee that the database will be repaired after using Hard Recovery Process.
  • Eseutil /p will purge the data in the log files of the database that is deemed as inconsistent. This will cause data loss.
  • It is recommended to move the mailboxes to some other database after the original database undergoes hard recovery process. This is because, after the Hard Recovery process, the database becomes hard coded and Microsoft will not be able to help with any issues on a hard coded database.

To avoid data loss and restore all the data from corrupted database, you can use a third-party Exchange repair tool, such as Stellar Repair for Exchange. This tool repairs the corrupt Exchange database (EDB) file and saves the repaired file data in PST and various other file formats, like MSG, EML, etc. It can also directly export the data from repaired EDB file to a live Exchange Server database or Office 365 with complete integrity. The tool supports Exchange Server 2019, 2016, 2013, and earlier versions.

Conclusion

To recover an exchange server after a total failure you can use the /m:RecoverServer switch on the system after ensuring all the prerequisites are fulfilled. After recovering the server, you need to recover the database of the server as well.

Image3

For this you can use Recovery Databases (RDB) to recover from the latest backup. However, the recovered database might be in dirty shutdown. You can either repair the database using native tools or use third-party exchange recovery software like Stellar Repair for Exchange to recover the databases without any data loss.