Exchange 2016: Backup and restore with Windows Server Backup (Part 2)

The second article in this series is about restoring a mailbox from the data backup that was created in Part 1 with the Windows Server backup was created.

The procedure is the same for many backup tools and essentially consists of writing the mailbox database back to a restore database and restoring the required data from it. The procedure described here also works with many other backup tools.

Create recovery database

A recovery database must be created so that data can be restored. Some backup tools create the recovery database automatically during the recovery process. However, many tools leave this to the administrator.

The following command creates a new recovery database:

New-MailboxDatabase -Recovery -Name RecoveryDB -Server FWCOMEX1 -EdbFilePath "D:\Databases\RecoveryDB\RecoveryDB.EDB" -LogFolderPath "D:\Databases\RecoveryDB"

image

Important note: When sizing an Exchange server, sufficient storage space for a recovery database should always be taken into account. If, for example, a 500 GB mailbox database needs to be restored in order to restore individual small mailboxes from it, then the corresponding storage space should be available. If capacities have to be expanded first, this will only delay the recovery process.

The information memory is not restarted in this case.

Restoring the backed up database

Once the restore database has been created, the restore process can begin. The restore process of the database naturally differs depending on the backup tool.

I created a backup with Windows Server backup in the first part:

image

First, the location of the fuse is specified:

image

In the following dialog, you can select the backup to be restored:

image

The Windows Server backup can also restore the Exchange databases directly. However, as this article is intended to explain the recovery using a recovery database and not the complete mailbox database, but only one mailbox is to be restored from the backup, "Files and folders" is selected instead of "Applications":

image

The mailbox database in which the mailbox to be restored is located can now be selected. In this case, only the database file is restored; the latest backup status can be restored by also restoring the transaction logs (Exxxxxxxxxx.log):

image

The restore now takes place in the folder that was specified when the recovery database was created. In this case it is "D:\Databases\RecoveryDB":

image

In the next step, press the summary button and wait until the recovery is complete

image

Putting the recovery database online

After restoring the backup, the database file has the original name and must therefore be renamed. When the recovery database was created, the name "RecoverDB.edb" was specified as the database file name. The restored database under D:\Databases\RecoveryDB is therefore renamed to ReoveryDB.edb:

image

After renaming, it will look like this:

image

However, the recovery database cannot yet be switched online as it is in the dirty shutdown state. The following command can be used to check the status of the database:

eseutil /mh 'D:\Databases\RecoveryDB\RecoveryDB.edb'

image

I have restored the mailbox database without the log files and therefore put the database back into the clean shutdown state with the following command so that the database can be mounted:

eseutil /p 'D:\Databases\RecoveryDB\RecoveryDB.edb'

image

Depending on the size of the database, this process can take quite a while:

image

After the process has run through, the database is in the clean shutdown state:

image

Note: The most up-to-date data from the backup is obtained if the transaction logs are also restored from the backup. If the transaction logs (Exxxxxxxxxx.log) are restored in addition to the EDB file, the logs must be imported into the database. This is done with the following command (instead of eseutil /p):

eseutil /r E00 /l 'D:\Databases\RecoveryDB' /d 'D:\Databases\RecoveryDB'

Once the recovery database is in the clean shutdown state, the database can be switched online:

Mount-Database RecoveryDB
Get-MailboxDatabaseCopyStatus RecoveryDB

image

Restore mailbox

After the recovery database has been switched online, the contents of the recovery database can be checked with the following command. For example, to verify that the corresponding mailbox is also contained in the recovery database:

Get-MailboxStatistics -Database RecoveryDB | ft -AutoSize

Restoration

The following command can now be used to restore a mailbox; the user's current mailbox is replaced by the backup replaced:

New-MailboxRestoreRequest -Name "Administrator" -SourceDatabase RecoveryDB -SourceStoreMailbox "Administrator" -TargetMailbox "Administrator"

image

The following command can be used to determine the status of the recovery:

Get-MailboxRestoreRequest

image

Note: In this case, the Administrator user's mailbox is overwritten with the mailbox from the backup. Further restore options will follow in the next article.

5 thoughts on “Exchange 2016: Backup und Wiederherstellung mit Windows Server Sicherung (Teil 2)”

  1. Hallo Frank,
    das ist zwar schon ein älterer Beitrag, aber ich hoffe, trotzdem noch eine Antwort zu bekommen.
    Bei meinem Exchange lässt sich der Microsoft Exchange-RPC-Clientzugriffsdienst Dienst nicht mehr starten. Wenn ich jetzt die komplette Anwendung wiederherstelle, werden dann die Dienste auch repariert oder nur die DB? Oder muss ich den Systemstatus auch wiederherstellen?

    Danke,
    Thomas

    Reply
  2. @pewa2303
    Wenn Du schon Veeam im Einsatz hast, kannst Du auch mit VeeamEndpointBackup ( kostenlos )die physichen Server sichern. Hier gibst es zwar auch keinen ExchangeAgent, aber die Sicherung ist mit allem Tütata.
    Restore / Wiederherstellung wie von Frank beschrieben.

    Gruß
    Volker

    Reply
  3. Stimmt schon Dave, wobei die Bordmittel einfach schon vorhanden sind und auch nur „einmal“ sauber per Skript aufgesetzt werden müssen. Im Desaster-Fall fängt sowieso die Arbeit an…
    Ich würde das jedem empfehlen bei „kleineren“ Installationen, quasi als zweite, zusätzliche Sicherheitsstufe laufen zu lassen. Wichtig auch – testet Eure Backups!

    Danke Franky für die Anleitung !

    Reply
  4. Interessante Anleitung, in der Praxis ist es aber mit etlichen Backup Tools wie Symantec Backup Exec oder Acronis Backup, sehr viel einfacher Postfächer oder sogar einzelne Mails oder Objekte mittels GUI wiederherzustellen.

    Aber ist doch spannend zu sehen wie man mit Sicherungsmittel vom Hause Microsoft auch zum Ziel kommt. Auch wenn man zugeben muss, das da man einige an Handarbeit anlegen muss, um das gleiche Resultat zu erhalten. Gruss Dave

    Reply
  5. Danke für die Anleitung. Unser Projekt mit Exchange 2016 beginnt gerade jetzt. Und VEEAM Backup ist noch nicht ready für die Sicherung physischer Server, d.h. als Zwischenlösung wird’s wohl Windows Server Backup. Ich dachte immer man muss den Server komplett sicher, d.h. Image, auch c: aber jetzt weiß ich mehr. Lg

    Reply

Leave a Comment