Summary: The guide explains how to use Setup /m:RecoverServer switch in Exchange Server 2010, 2013, 2016, and 2019 to restore a failed Exchange server. Also, it outlines steps to mount and restore the mailbox database from failed Exchange server to a new server without data loss.
Exchange server monitoring is critical to ensure smooth running of the server at all times. But no matter how well you monitor the Exchange, at some point in time, you may experience a situation when it completely breakdown and fails to boot. This may happen due to damaged hardware or corrupt software.
If it’s caused by a hardware failure, you may replace it and bring the server back online. However, if the damage is caused by corrupt software or operating system, you can use the setup /m:RecoverServer switch in Exchange Server 2010/2013/2016/2019 to restore the Exchange server and mailbox database.
What is Setup /m:RecoveryServer Switch?
Setup /m:RecoverServer Active Directory of Windows server. When the Exchange fails and doesn’t start, an administrator can use Setup /m:RecoverServer switch command to rebuild a new Exchange server with the same name by using the settings and information stored in Active Directory.
How to Use Setup /m:RecoveryServer to Recover Exchange Server?
To use Setup /m:RecoverServer for Exchange server recovery, you need to create a new server with the same hardware and software configuration as the existing one. In short, the new server should be an exact replica of the old Exchange server.
Get a server chassis and build a new Windows server instance with the same service pack and naming convention
Installidentical characteristics as the failed server
Make sure to install the same hardware components as available in failed Exchange server
The drive letters and partitions should be the same
Install Operating system and Antivirus
Install Exchange server roles
Perform recovery install of Exchange server by running the setup with the /m:RecoverServer switch
Verify that all custom configurations are applied, if not then re-apply
Join the Exchange server to the same domain. First, reset computer account that already exists in the AD
Install the Exchange server pre-requisites
Finally, create a copy of Exchange server setup files at the location where these are accessible. Use the same setup file for Exchange that was previously installed on the server
Open the command prompt as an administrator and use the cd command to change the directory containing Exchange setup files
Then enter the following command in command prompt window
As mentioned earlier, Exchange stores most of the Exchange configuration settings and other information such as directory settings, transport settings, location and database names, etc. in Active Directory (AD). These settings and information are restored when you execute the Setup /m:RecoverServer command.
However, to restore the server-specific configurations, such as SSL certificate, you can export the certificate and then import it to the new recovered server. Once imported, you can then enable the SSL for all other Exchange services.
Similarly, you must document and restore other server-specific custom configurations such as IIS settings, modified Config files or Registry keys and more to the recovered server.
Enable Exchange Services and Restore Exchange Mailbox Database
Now that you have successfully recovered and restored failed Exchange server, check if everything is working fine. If the volumes containing mailbox databases and transaction logs are configured with same drive letters or mount points, the database mounts successfully and continues operation with no data loss. In case the database is lost due to server failure, use the backup to restore the lost database.
Ideally, the Exchange database backups are stored at a different location. This helps when there is an issue of dirty shutdown or database corruption.
Check that Exchange database backup is authentic and start the restore procedure. But before that, you must ensure that the backup isn’t obsolete or corrupt.
Soft Recovery with Eseutil
If the database and log files are available (or restored from backup) but the server fails to mount Exchange database, use Exchange’s inbuilt-utility Eseutil for soft recovery. This helps restore the database and log files. The steps are as follows:
Before you start with soft recovery, check the health of database and log files by running the following command,
Eseutil/ml“Path of the log files\log prefix”
For instance, Eseutil /ml H001.log
Now start Soft Recovery by running the following command,
Eseutil/r<Log Prefix>/l“Path of the folder containing log files”/d“Path of the folder containing database”
This should restore the database successfully. This command also helps restore the database if logs are missing
However, due to EDB-STM mismatch, you may encounter the following error,
Operation terminated with error -1216 (JET_errAttachedDatabaseMismatch, An outstanding database attachment has been detected at the start or end of recovery, but the database is missing or does not match attachment info) after n seconds.” To resolve this error, run soft recovery with the “/i” switch at the end of command.
Hopefully, this will resolve the problem and restore the Exchange database. If not, it would be best if you employ an Exchange Server Recovery software to repair corrupt database and then mount the database.
Stellar Repair for Exchange – An Exchange Server Recovery Software
Stellar Repair for Exchange is one of the most reliable Exchange data recovery tools to recover Exchange data when inbuilt utility and backup fails to restore the database due to corruption. This software repairs corrupt databases, which might have prevented mounting of database and log files during soft recovery.
Though it’s always at the discretion of Exchange Administrators to select disaster recovery methods and combat crisis, it is recommended to include an Exchange recovery software as part of their disaster recovery plan. This is because Exchange Administrators cannot be available 24x7x365 and Exchange breakdown happens unannounced. Having a GUI-based Exchange Recovery software can greatly help in such situations.
Though there is always a disaster recovery plan ready and available for all organizational processes, it doesn’t ensure a cent percent recovery when a crisis hits. In case of an Exchange server breakdown, building a new server followed by setup /m RecoverServer for Exchange server 2010/2013/2016/2019 is an ideal disaster recovery technique. However, it hardly proves to be successful mainly due to Exchange mailbox database corruption, which may happen when Exchange server crashes or shutdowns unexpectedly.
In such cases, you must implement an Exchange recovery software like Stellar Repair for Exchange to overcome database corruption, resolve common problems with Exchange mailbox database, and ensure mailbox database recovery. To know more about the software, please read the MVP & Subject Matter Experts Review.
Eric Simson is an Email Platform Consultant and is associated with Stellar Data Recovery from last 6 years. He writes about the latest technology tips and provides custom solutions related to MS Outlook, MS Exchange Server, Office 365, and many other Email Clients & Servers.