Steps to Recover Exchange 2019 Server

Exchange 2019

Like any server or anything in the world, an Exchange Server is not perfect, and it can fail due to hardware, corrupted updates, an issue on the virtual environment hosting it, or a virtual machine crash. One would rely on a snapshot of the server if it’s a virtual machine, but an Exchange Server is an application that maintains state data. You will have grave consequences if you try to recover an Exchange Server virtual machine from a snapshot. In such cases, recovery is not supported.

Scenario

Let’s consider that we have two servers, SRV01 and SRV02, both Windows Server 2019, along with an Exchange 2019 installation with Database Availability Group (DAG). We have two Exchange databases replicated between SRV01 and STV02. What if SRV01 went down due to corruption or hardware failure, and we need to recover it?

Installation

Before installing the new SRV01 Exchange Server, you need to check the installation path of the failed server, which can be retrieved from the Configuration Partition using ADSIEDIT.MSC. After finding the server, right-click on SRV01 and select properties. In the new window that opens, look for the attribute msExchIsntallPath under the Attribute Editor tab, which will show the installation path of the previous SRV01.

From SRV02, we open the Exchange Control Panel and remove SRV01 from being a member of the DAG while removing any passive database copies relative to SRV01.

If you don’t know, you can do so by opening a PowerShell window using the Exchange Management shell and running the command:

Get-MailboxDatabaseCopyStatus – Server SRV01.

This will list all the databases replicating to the server. To remove the passive copies, run the same command and add.

Remove- MailboxDatabaseCopy

The next step is to clean the server from the cluster by using the following command to forcefully evict it.

Get- ClusterNode SRV01 | Remove-ClusterNode

The last step in the Exchange is to remove the server from the DAG, which can be done by executing.

Remove-DatabaseAvailabilityGroupServer SRV01 –Identity DAG01 – ConfigurationOnly

After this step and the Active Directory has replicated successfully, we need to open the Active Directory Users and Computers, find the computer account of SRV01, right-click on it, and select Reset Account. This will reset the computer account and will not cause any issues since we will keep the same name.

We need to start by installing a new machine with Windows 2019 Server, maintaining the same computer name and IP Address, and ensuring that all relative updates and fixes are installed. Once this is done, you must grab and install all the prerequisites for the Exchange Server. After ensuring that the operating system is fully patched and the prerequisites are installed, we grab the Exchange installation media and the setup with Recovery option as setup /m: Recoverserver and state the installation path, if not the default one, with the parameter /TargetDir. Ensure the media is at the same version level as the previous SRV01 installation and not above it.

Once the installation is complete, you must ensure that the Exchange Server services start successfully, along with the correct certificates installed for Web, IMAP, POP, and others. The virtual directories are configured as they should be by your setup and not the internal hostname. Since this is a new installation, you will need to make sure with the people who take care of the antivirus to exclude the Exchange Databases from active scanning.

Once this is done, you must add the server back as a DAG member by running the command.

Add-DatabaseAvailabilityGroupServer –Identity DAG01 – MailboxServer SRV01

If all goes well and the server is a healthy member in the DAG, we can re-seed the databases from SRV02 to SRV01 by using

Add-MailboxDatabaseCopy EXDB01 –MailboxServer SRV01

The option is you have a single server is to run and make a new Exchange installation keeping the same server name and IP address. Unfortunately, it’s not that easy, and if you do this, it will fail as if the old server was stopped abruptly; it will still exist in the Active Directory Schema’s Configuration Partition, and you would need to make a complete clean-up of the server’s presence. This will not work, as you cannot attach the database to the newly installed server. An alternative to this is to try to recover the existing server or recover the server from backup. The issue is that the emails stored between the backup and when the server crashed are lost.

Best Alternative

Third-party Exchange Recovery software, such as Stellar Repair for Exchange, allows you to easily repair corrupted EDB files, extract data, and migrate the data directly to a new database. If you have a single server installation, you can migrate directly to another Exchange Server.

This way, you will not lose any emails stored between the last backup and the server’s corruption. The application can also be migrated directly to Office 365.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *