Exchange 2016: Restoring a database on another server

Exchange 2016 databases can also be restored from a backup to other Exchange 2016 servers. The database therefore does not necessarily have to be restored to the server on which it was backed up or was active. It does not matter whether the server was a member of a DAG. However, it is important that both Exchange servers use the same version of the operating system and the Exchange server.

In this small example, there are two Exchange 2016 servers, both Exchange servers run on Windows Server 2016. The two Exchange servers are not members of a DAG (Database Availability Group) Exchange and Windows are also at the current patch level.

Each Exchange server has a mailbox database (MDB1 and MDB2). In the MDB2 database there are two user mailboxes (User1 and User2). The environment therefore looks as follows:

Restoring a database on another server

To simulate an error, the Exchange Server TEX2 is switched off. The MDB2 database is therefore offline and the mailboxes of both users are offline.

To ensure that the MDB2 database is now available again as quickly as possible, it can be restored to TEX1. This saves time until the Exchange Server TEX2 is up and running again.

Restoring the database

In order to activate the database from the backup on TEX1, a new empty database must first be created on TEX1. The following command creates the MDB2-Restore database on the TEX1 server:

New-MailboxDatabase -Name "MDB-Restore" -Server TEX1 -EdbFilePath "D:\MDB2-Restore\MDB2-Restore.edb" -LogFolderPath "D:\MDB2-Restore"

New database for recovery

The specified database folder does not yet contain a database file (.EDB).

New database for recovery

The backup of the database is now restored to this folder and renamed to the specified name (-EdbFilePath):

Restoring the database

In order for the restored database to be integrated, the database must be in the clean shutdown state. This can be checked with the following command:

eseutil /mh .\MDB2-Restore.edb

Check Clean Shutdown State

If the database from the backup does not yet have the Clean Shutdown State, is described here how the clean shutdown state can be restored.

Before the database can now be mounted, the restore from the backup must be permitted. This is done with the following command:

Set-MailboxDatabase "MDB-Restore" -AllowFileRestore:$true

Allow recovery

The restored database can now be integrated and the status checked:

Mount-Database "MDB-Restore"
Get-MailboxDatabaseCopyStatus

Integrate database

Although the database with the mailboxes has now been restored, the user accounts of the two test users still refer to the "old defective" database MDB2. The following screenshot shows the user account of "User1", which still refers to the wrong database:

Rehoming the mailboxes

So that the accounts now point to the new restored database, all mailboxes from MDB2 must now be referred to the MDB2-Restore database (rehoming). The following command can be used for this:

Get-Mailbox -Database "MDB2" -resultsize unlimited | Set-Mailbox -Database "MDB-Restore"

Rehoming the mailboxes

After execution, the corresponding mailboxes now refer to the restored database and the users can reconnect:

Rehoming the mailboxes

There are other ways to restore databases. More methods will follow in the next articles. It can't hurt to know the options...

9 thoughts on “Exchange 2016: Wiederherstellung einer Datenbank auf einem anderen Server”

  1. Nur eine kleine Korrektur: MDB-Restore im unteren Bereich der Anleitung sollte wohl das gleiche sein, wie MDB2-Restore aus dem Anfang (?).

    Reply
  2. Hallo, eine Frage hierzu. Wenn ich zwei Exchange 2016 habe auf jeweils Windows 2016 Std. und einmal mit CU14 und einmal mit CU19; kann ich vom CU14 die Datenbank nehmen und im CU19 einfach einhängen und dann die User auf die CU19 verweisen (also den entsprechenden Server)?
    mfg.
    Hartmut

    Reply
  3. Datenbank dank der hervorragenden Anleitung wieder hergestellt. …. was muss ich tun um die Postfächer wieder zu füllen ?

    Reply
  4. Hallo bei mir fehlt der Reiter Attribut Editor und beim einbinden der Datenbank mag er den Namen Database nicht.

    Hatte mit den exchange mit einer dag zerschossen. (nach Anmeldung nurnoch http 500)

    Reply
  5. Hallo,

    ist ein ReHoming auch für öffentliche Ordner möglich?
    Wenn ich es richtig verstanden habe, liegen die öffentlichen Ordner doch auf in der einen Datenbank. Diese habe ich laut Deiner Anleitung erfolgreich auf einen anderen Server verschoben. Jetzt muss aber noch die Verknüpfung auf die wiederhergestellte Datenbank auf dem neuen Server verweisen. Wie stelle ich das an.

    VG Matthias.

    Reply

Leave a Comment