Formerly, we discussed Exchange 2013 mailbox backup with a help of standard Windows Server Backup functionality and now let’s seehow to recover Exchange mailbox database from backup which we got before.
A plan of mailbox database recovery provides two variants:
- Database recovery with current database replacement – is used in case of database loss or fatal failures with active database.
- Mailbox database recovery in separate Recovery database – is used for recovery of individual mailboxes or specific users` letters from backup. It doesn’t affect users` mailboxes in active database during recovery from backup.
[tab title=”Contents of this article”]
Exchange Email Database Recovery from WSB Backup
In the previous article we used Powershell to backup Exchange database (it’s more convenient from backup process automation point of view). However, it’s more convenient to recover data from WSB graphic interface (it is rather difficult to imagine a plan with a fully automated mail recovery scenario).
- Run Windows Server Backup Management Console by performing wbadmin command.
- Select that you need to recover data from a backup stored on another location.
- Then assign that backup is stored in the Remote shared folder.
- Specify full UNC path with mailbox database backup (\\Bakup01\db\exchange2013 in our example)
- Then you should choose data and time of backup creation for its further recovery.
- Select that the following applications will be recovered (Applications item).
- Select Exchange item
- Mailbox database can be recovered to original folder (Recover to original location) — in this case the current mail database can be recovered either to original folder (in this case the current database will be rewritten) or in any other folder. We will use the second option.
- All you have to do is to wait for mail database recovery completion. After the process completion the files of recovered database will appear in C:\Recovery folder.
Check and restore the integrity of Exchange 2013 database
So we recovered Exchange 2013 database and transaction files from backup. But before starting Recovery Database creation and its mounting you need to transfer recovered database to a Clean Shutdown state, or it will be impossible to mount it. That is because immediately after recovery, Exchange database goes to non-consistent (Dirty shutdown) state because database was shutdown incorrectly and a part of transaction from log files were not replayed on database.
Use eseutil.exe utility for Exchange 2013 database state check and its integrity recovery. In our example the file with a base is called 3nd.edb and transaction logs have prefix E03.
Check the database state by performing the following command:
eseutil /mh c:\restore\3nd.edb | Select-String –Pattern “State:”,”Log Required:”
The database is in “Dirty Shutdown” state. We need to transfer the database in “Clean Shutdown” state by recording required transaction log files in mailbox database. This operation is called database Soft Recovery.
eseutil /R E03 /L “С:\Restore” /D “C:\Restore”
Check whether database is consistent and switched to the state Clean Shutdown.
Creation and Mounting of Recovery Database
After that you can create Recovery database and mount recovered from backup email database in it.
New-MailboxDatabase –Recovery –Name RDB –Server Mail3 –EdbFilePath “C:\Restore\3nd.edb” -LogFolderPath “C:\Restore”
Mount the database
Check whether the database is mounted successfully:
Get-MailboxDatabase –Status RDB | fl Mounted
In the next article of this run we will discuss the methods of getting mailboxes or separate emails from Exchange 2013 recovered database.