Archive for the ‘Backup’ Category

In previous versions of Exchange Server, we had the recovery storage group, or RSG, which allowed us to restore a copy of the EDB file associated with the Mailbox Database and recover individual mailboxes or mail/calendar/contact items.

In Exchange 2010, we no longer have Storage Groups and therefore no Recovery Storage Group.  Instead we have the Recovery Database.  This Recovery Database can only be mounted on one server at a time.  As Mailbox Databases are not linked to servers they can be mounted on any server within the same Exchange Organisation.

Following on from my article here:  where we discussed how the Windows Backup Utility can be used to backup just the EDB and LOG files.  We will now look at how we can use this to restore the EDB file and recover the contents.  We will cover the following:

  • Restore the EDB & Log files
  • Create a Recovery Database from the EDB file
  • Use the ESEUTIL utility to replay the log files
  • Recover the required mailbox/mail items

Restore the EDB & Log files

Using the Windows Server Backup utility (Start > Administrative tools), in the action pane on the right hand side, select Recover.

On the first screen, select the backup location as per the image below.  If you have the backup stored on another drive on the same server then select This Server, otherwise select A backup stored on another location and click Next.

The next screen you see (image below) will be asking you the location of the backup you want to restore.  Choose either Local drives or Remote shared folder.  Click Next.

Make your selection and click next.  On the following screen you will have to provide the location of where the backup is stored.  This will be different depending on the location you specified on the previous screen.  Locate your backup and click next.

The next screen will be the date selection that you want to restore from (image below).  Select the date from the calendar and the time the backup was taken, and then click next.

Select the files and folders option from the following screen (there is no need to restore the full volume) and click next.  You will see a full list of files and folders as displayed below.  You need to select the files from the list.  Make sure you select all the contents of the folder where the mailbox store is stored.  Including the log files.

Once you have made the selection, click next. The following screen will ask you where you want to store the recovered data.  Complete the detail and then click next.  On the final screen click recover.

Create a Recovery Database from the EDB file

Once we have restored the EDB file and Log files, we then need to create a Recovery Database.  This process can only be performed using the Exchange Management Shell.
Assuming the following Information:

  • Servername is WIN2008R2 (must be an Exchange Server that holds the Mailbox Role)
  • The EDB & Log files have been restored to C:\EDBRestore\
  • EDB File Name is Mailbox Database 2012387847.edb
  • The recovery database name will be RecoveryDatabase1

Run the following command in the Exchange Management Shell:

New-MailboxDatabase -Recovery -Name “RecoveryDatabase1” -Server WIN2008R2 -EdbFilePath “C:\EDBRestore\Mailbox Database 1.edb” -LogFolderPath “C:\EDBRestore”

Once you run this command you will see an output similar to the image below.

This will create the Recovery Database.  We can confirm the database has been created and that it is a recovery database by running the following command from the Exchange Management Shell:


This will display an output similar to the image below.

The important part of this screenshot is that the database listed as RecoveryDatabase1 has the value of True under the Recovery setting.

We now have a recovery database created.  The next step is to replay any log files we have to bring the store up to date.

Use the ESEUTIL utility to replay the log files

The EDB file we have restored will not include any data that is contained in the log files as these are committed to the database AFTER we perform the backup.

The utility we use to perform the replay is ESEUTIL, this utility is the same in all versions since Exchange Server 2000.

We need to know the log file numbering before we can run ESEUTIL.  To do this, navigate to the folder you restored the EDB & Log files to (in the case of this article it is C:\EDBRestore) and look for the file that starts with an E and has 2 numbers after the E and an extension of .chk, so for example E00.chk.  This is what is known as the checkpoint file, or the working log file.  All the other log files will start with the same 3 digits and they are created when the checkpoint file gets full.

So assuming your checkpoint file is called E00.chk we now need to run the command to replay the log files in the Exchange Management Console.

Once the Exchange Management Shell is open type the following commands:

Cd \ <enter>
CD EDBRestore

This will replay the log files that you have restored from the backup into the database.

The final part of this step is to mount the Recovery Database.  To do this we run the following command from the Exchange Management Shell:

Mount-Database RecoveryDatabase1

We are now in a position to restore the required data.

Recover the required mailbox/mail items

Unlike previous versions of Exchange, there is no Graphical User Interface for the recovery process.  To recover mail items we need to use the Exchange Management Shell.

So for example, we have a user called mark_wills and he has deleted the entire contents of his mailbox and you need to recover all his mail.

We have a copy of the mailbox belonging to mark_wills in our Recovery Database.  To restore the required mailbox, we would use the Exchange Management Shell and run the following command:

Restore-Mailbox -Identity mark_wills -RecoveryDatabase RecoveryDatabase1

This will recover a mailbox called mark_wills from the Recovery Database called RecoveryDatabase1 to the mark_wills mailbox in the live database.  This method relies on the original mailbox still being in tact.

The next option is to recover the mark_wills mailbox from the Recovery Database and place it into a folder called “mark_wills Recovery” within a mailbox called tigermatt.

Restore-Mailbox -Identity tigermatt -RecoveryDatabase RecoveryDatabase1 -RecoveryMailbox mark_wills -TargetFolder “mark_wills Recovery”

We also have the ability to search the mailbox content for keywords.  In this example we search for any messages containing the word “demazter” and restore those items to a folder called “mark_wills recovery with demazter text” within a mailbox called alanhardisty.  To do this we would run the following command:

Restore-Mailbox -Identity alanhardisty -RecoveryDatabase RecoveryDatabase1 -RecoveryMailbox mark_wills -SubjectKeywords “demazter” –TargetFolder “mark_wills recovery with demazter”

There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 service Pack 2

Exchange 2010 includes a plug-in for Windows Server Backup that allows you to perform a backup of the Exchange data using the Volume Shadow Copy Service.

Preparation Tasks

With Windows 2008 R2 and Windows 2008 the Windows Backup feature is not installed by default so we first need to add this feature. To do this launch Server Manager, under Features select Add Feature. Locate the Windows Server Backup Features and put a check box in both options.

Now that the features are installed the plugin needs to be enabled. In the services snapin (Start > Run > Services.msc) locate the “Microsoft Exchange Server Extension for Windows Server Backup” set the service to automatic and start it.

Backup the store

From Start > All Programs > Accessories > System Tools select Windows Server Backup

In the task pane select Backup Schedule. When the wizard opens click Next on the first screen and then select either Full Backup if you want to perform a full system backup or Custom if you just want to select the items to be backed up. So if you just want to backup the information store then select Custom. Click Next.

On the following screen click Add Items and browse to the folder your information store files are stored in. By default with Exchange 2010 this is C:\Program Files\Microsoft\Exchange Server\V14\Mailbox there will then be a folder for each store called Mailbox Database (Database reference number)

Once you have selected the Mailbox Databases and have returned to the wizard screen click the Advanced Settings button and under VSS Settings select VSS Full Backup

Configure your schedule and set the destination on the following two screens and select Finish. This will backup your Exchange databases and flush the logs.