How to Recover a Lost Exchange Server
Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2011-04-15
This topic explains how to recover from a server loss using the /m:RecoverServer switch on the setup command. Almost all the settings for a computer running Microsoft Exchange Server 2007 are stored in the Active Directory directory service. The /m:RecoverServer switch rebuilds an Exchange server with the same name and settings, using the information in Active Directory.
If Setup /m:RecoverServer encounters an error during a server recovery and setup fails, it is possible that running /m:RecoverServer again may also fail. If running Setup /m:RecoverServer again is unsuccessful, you may encounter the following situations:
Not all server roles are fully recovered.
Setup fails to recover the remaining roles because the server contains configured roles.
Uninstalling the remaining roles fails because they failed during disaster recovery efforts, and no other action may be attempted until disaster recovery succeeds.
For some error cases, running Setup again is successful. However, when running Setup again fails, you can perform a manual workaround that allows Setup to continue and attempts to recover the roles that were not recovered the first time. This workaround is only to allow Setup to begin again; it will not address whatever problem caused setup to fail the first time. That problem must be diagnosed and fixed before setup is run again.
If Exchange is installed in a location that is not the default location, use the /TargetDir switch to specify the location of the Exchange binary files. If you do not use the /TargetDir switch, the Exchange files are installed in the default location (%programfiles%\Microsoft\Exchange Server\V14).
To determine the installation location of Exchange, follow these steps:
To perform the following procedure on a computer that you will be installing Exchange 2007 on, the account you use must be delegated the following:
Exchange Server Administrator role and local Administrators group for the target server
For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.
The server needs to be named the same name as the server that it will be replacing and have a matching drive configuration for drives that had Exchange data on them.
Reset the domain computer account for the lost server. To do this:
Open Active Directory Users and Computers.
Locate the computer for the lost server.
Right-click the computer name, and then click Reset Account.
Bring the new server running Microsoft Windows Server 2003 online, and join it to the domain with the same name as the lost server.
- Open Active Directory Users and Computers.
Configure all drives with the same logical assignments that were present on the missing server.
Open a Command Prompt window in your Exchange source folder, and run the following command:
Note: The source folder is the processor type identifier folder (\i386 or \amd64) on your DVD or other source media.
To allow Setup to run again, you must first identify the roles that were recovered. If the setup console from the first attempt is still visible, the recovered roles have "COMPLETED" next to their names. Otherwise, you must go to the registry and open the key:
Several subkeys with the names of server roles (for example, "MailboxRole") are under the v8.0 key. Examine each subkey. If the subkey contains both an UnpackedVersion value and a ConfiguredVersion value, and both values are the same (which will be a string such as "8.0.685.23"), that server role is successfully recovered and installed. Make a note of which roles have been successfully recovered.
Note: Incorrectly editing the registry can cause serious problems that may require you to reinstall your operating system. Problems resulting from editing the registry incorrectly may not be able to be resolved. Before editing the registry, back up any valuable data.
Back up the data that you intend to modify in both the registry and Active Directory. In the registry, open the key:
Right-click this key, select Export, and then save the file.
Using AdsiEdit (AdsiEdit.msc), find the Exchange server object for the server that you are recovering. For example, the following is a path to a server object:
CN=<name of server>,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=<name of organization>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=<name of domain>
Make note of the value of the attribute msExchCurrentServerRoles; it is an integer. The value of this attribute on the server object indicates the roles that were configured on the server object before the failure, and it is derived by adding values as follows:
Server role Role value
Client Access role (CAS)
Unified Messaging role
Hub Transport role
Edge Transport role
Change the variables that Setup reads to force it to disregard the roles that were recovered and recover the roles that were not recovered. This requires temporarily altering the information in the registry and Active Directory:
Using regedit.exe For every successfully recovered role, rename its key under HKLM\Software\Microsoft\Exchange\v8.0 by appending a 0 or otherwise changing the name of the key.
Using AdsiEdit.msc Take the current value of msExchCurrentServerRoles, subtract the value corresponding to the recovered roles, and then modify the attribute to the new value. For example, if you have successfully recovered the Mailbox role on a server with the Hub (value = 32), Mailbox (value = 2), and CAS (value = 4) server roles installed, you have a value of 38. From that value, subtract 2 for the Mailbox role, which leaves a value of 36 for msExchCurrentServerRoles.
- Using regedit.exe For every successfully recovered role, rename its key under HKLM\Software\Microsoft\Exchange\v8.0 by appending a 0 or otherwise changing the name of the key.
Run Setup /m:RecoverServer as you did before to recover all the remaining unrecovered server roles.
After the recovery is finished, restore the edited values in the registry and Active Directory:
Using regedit.exe Setup will have created new keys corresponding to the previously renamed keys for successfully recovered roles. Delete those keys, and rename every key under HKLM\Software\Microsoft\Exchange\v8.0 back to its original name.
Using AdsiEdit.msc Modify the value of msExchCurrentServerRoles back to its original setting.
- Using regedit.exe Setup will have created new keys corresponding to the previously renamed keys for successfully recovered roles. Delete those keys, and rename every key under HKLM\Software\Microsoft\Exchange\v8.0 back to its original name.