Exchange 2010: Dial-Tone Recovery

#In this article I have described how to restore an Exchange database, but this should only be the last choice of an administrator to restore Exchange functionality. If the complete database has to be restored from the backup, you can use the Dial-Tone procedure.

What is the difference between a normal database recovery and dial tone recovery?

During a normal Exchange database restore, the database is offline until it has been restored from the data backup and made available again. Depending on the data backup concept, the recovery may take some time, during which time no users can connect to the Exchange server. Dial-Tone Recovery provides a remedy here. First, a new empty database is created in which the users' mailboxes are stored. Each of the affected users can now reconnect to the Exchange Server and send or receive mails. In this way, business operations are maintained to a certain extent. This gives the administrator a little more time to restore the database from the backup. As soon as this is done, the work begins J

What does the test environment look like?

To illustrate how to perform a dial tone recovery, I have set up a small test environment


DC1 acts as the domain controller and the 3 Exchange roles Mailbox, Client Access and Hub Transport are installed on EX1. There are 3 users with mailboxes: Maggie, Lisa and Bart. All 3 users already have a few mails in their mailbox. The Exchange database is stored on drive H:. To simulate the failure of the database, I simply detach drive H: from the operating system later and provide a new empty drive. This is similar to a hard disk (or RAID array etc.) failing and being replaced by a new one.

The database in which the mailboxes are stored is called "Productive DB" and, as already mentioned, is located on drive H:

Of course, the database cannot be restored without a functioning backup, so I back up the H: drive with the "Windows Server Backup" once to the Z drive. I only use the drive to store the backup there. Of course, the backup can also be performed with any other Exchange-compatible backup software. I use the Windows Server backup because it is supplied with the operating system and fulfills its purpose for this test. I will write a separate article on backing up and restoring with Windows Server Backup.

As you can see here Lisa has 3 messages in her inbox

The database has been backed up and the H: drive has been deleted. All database files no longer exist:

In the Exchange Management Console we can see that the database is no longer provisioned

When trying to reintegrate the database, this error message is displayed because all database files have been deleted.

I now mount a new drive in the server and mount it as drive G: then the backup of the database is restored to the new drive.

The backup has been restored to the "G:\Return Backup" folder

This is the initial situation, now the Dial Tone Recovery can be carried out. At this point in time, no user whose mailbox was saved in the deleted database is able to access their mailbox.

Performing Dial Tone Recovery

First we create a new empty database for the users so that they can receive and send mails again. The quickest way to do this is with the Exchange Management Shell

New-MailboxDatabase -Name "Dial Tone DB" -EdbFilePath "G:\Dial Tone DB\Dial Tone DB.edb" -LogFolderPath "G:\Dial Tone DB" -Server FWEX01

However, the users' mailboxes still point to the broken database, so we now point the users' mailboxes to the new empty Dial Tone database

Get-Mailbox -Database "Productive DB" | Set-Mailbox -Database "Dial Tone DB"

Now the new database is being made available, as soon as this is done the users will be able to receive and send mails again, but with an empty mailbox.

Mount-Database "Dial Tone DB"

As you can see here, Lisa can access her mailbox but the 3 messages are gone. Users with Outlook and activated cache mode, however, are lucky that they can still access their mails, appointments etc. as the data is still in the local cache of the client. We have now gained time to restore the data.

The database that was previously restored to G:\Restore must now be put into the clean shutdown state. Eseutil can first be used to check the status of the database. We can see here that the database is in the dirty shutdown state

eseutil /MH '.\Productive DB.edb'

The database can also be put back into the clean shutdown state with Eseutil

Eseutil /R E00 /I /D

The database should now have the clean shutdown state again. This can be done again with eseutil /MH '.\Productive DB.edb' be checked

Now we create a recovery database. This can also be done conveniently via shell. I create the database in the directory "H:\Recovery DB"

New-MailboxDatabase -Name "Recovery DB" -Server FWEX01 -EdbFilePath "G:\Recovery DB\Recovery DB.edb" -LogFolderPath "G:\Recovery DB" -Recovery


In order for the database files to be created on the drive, you must make the database available once, then we can take the database offline again directly

Mount-Database "Recovery DB"

Dismount database "Recovery DB"

Now we are also taking the Dial Tone database (Dial Tone DB) offline. This means that users can no longer access their mailbox. But you will have your data back again J

On the shell, the command Dismount database "Dial Tone DB" executed

At this point there are a few copy/move actions on the drive, caution is advised here. I will try to describe the processes as precisely as possible (see also graphic).

First, we move the contents of the "H:\Recovery DB" directory to "H:\TEMP". The "H:\Recovery DB" directory should now be empty (1)

Then we move the content of "H:\Dial Tone DB" to "H:\Recovery DB". Then we rename the database file "Dial Tone DB.EDB" to "Recovery DB.EDB". The previous Dial Tone database is now the Recovery database (2)

Now the directory "H:\Dial Tone DB" is empty and the directory "H:\Recovery DB" contains the original Dial Tone database. Now we copy the contents of "H:\Recovery" to "H:\Dial Tone DB" (if the backup software has created subfolders, please omit them, we only need the EBD and LOG files). We also have to rename the EDB file again, "Produktiv DB.EDB" now becomes "Dial Tone DB.EDB" again (3)

To get the "Dial Tone DB" (which now contains the restored data from the productive DB) we need to execute the following command

Set-MailboxDatabase "Dial Tone DB" -AllowFileRestore:$true

Now we can provide the Dial Tone database again and the users are able to access their mailbox. The database contains the 3 messages that Lisa had in her mailbox.

Mount-Database "Dial Tone DB"

However, as Lisa was working with the "old" Dial Tone database during the recovery (we moved the data to "H:\Recovery DB"), we now need to get this data into the current Dial Tone DB. To do this, we provide the recovery DB

Set-MailboxDatabase "Recovery DB" -AllowFileRestore:$true

Mount-Database "Recovery DB"


Now we can synchronize the data of the Recovery DB (which was our transition database) with the new productive database "Dial Tone DB"

Get-Mailbox -Database "Dial Tone DB" | Restore-Mailbox -RecoveryDatabase "Recovery DB"


Now the user's mailbox contains the mails, appointments, etc. that are restored from the backup and also the mails that the user sent and received during the transition period. This minimizes the downtime, even if it means more effort than a simple restore.

Last but not least, you can tidy up a little:

Dismount database "Recovery DB"

Remove-MailboxDatabase "Recovery DB"

The directories "H:\Recovery DB" and "H:\TMP" can be deleted after successful recovery. If you wish, you can also rename the new productive Dial Tone database back to "Productive DB".

A small note follows last, in my article I described that the backup is restored first and then a Dial Tone database is made available. This is of course not practicable. When a Dial Tone recovery is performed, the Dial Tone database is of course made available first so that the users are able to connect to Exchange again. Only then is the database restored. I didn't want to go into the restore process in detail in this article, hence the slightly reversed order. I hope the article is still understandable, if not just let me know.

2 thoughts on “Exchange 2010: Dial-Tone Recovery”

  1. Hi zusammen,
    mir hat der Beitrag geholfen. Die Urspruengliche Datenbank konnte nicht mehr eingebunden werden, damit waere der Kauf eines kostenpflichtigen Produktes notwendig geworden. Allerdings der Befehl: Get-Mailbox -Database „Dial Tone DB“ | Restore-Mailbox -RecoveryDatabase „Recovery DB“ konnte unter MS Exchg. 2013 nicht ausgefuehrt werden, da der Parameter „Restore-Mailbox“ nicht bekannt war. Die Wiederherstellung erfolgte ausserhalb der Arbeitszeit, daher waren keine Daten aus der RecoveryDB verloren.
    Vielen Dank fuer Deine Veroeffentlichung dieser Anleitung!

    Reply

Leave a Comment