If you missed the previous parts in this article series please read:
- Continuous Backup for Exchange Server with DPM 2007 (Part 1)
- Continuous Backup for Exchange Server with DPM 2007 (Part 2)
- Continuous Backup for Exchange Server with DPM 2007 (Part 3)
Although the only Exchange objects you can select to protect with DPM 2007 are entire storage group, when restoring you have more granular control. DPM supports recovery of:
- An entire storage group
- A single mailbox database
- A single mailbox
Depending on the type of information to recover, you also have some flexible restore options where to dump the data:
- To its original location
- To a Recovery Storage Group
- To a separate network folder
- To a tape drive
Besides all the discrete recovery points that are available (and they can be every 15 minutes), DPM2007 provides one more recovery capability: to recover "latest", resulting in near zero data loss when the recovery is complete. In the event of a complete loss of the Exchange database files, one can choose "latest" which instructs DPM to first restore to the last recovery point and then roll forward the surviving transaction logs beyond that, as long as the best practice of storing Exchange databases on one volume and logs on another has been respected.
Recovering a Storage Group
By recovering a storage group, you recover all of the mailbox databases in that storage group simultaneously. You can recover the storage group to its original location, to a file folder or to tape.
For this demonstration, I wanted to test the "latest" capability. In my test environment, the most recent synchronization was at 5:00 PM, so I sent a couple of messages after that to the Administrator mailbox (Figure 1).
Next, to simulate the complete loss of the database files of the First Storage Group, I stopped the Microsoft Exchange Information Store service and renamed the .edb files, which caused them to appear as dismounted in the Exchange Management Console (Figure 2).
Figure 1: Administrator mailbox
Figure 2: Exchange storage groups and mailbox databases
These are the required steps to recover a protected storage group to its original location:
- Open DPM Administrator Console and click Recovery on the navigation bar. Browse to the storage group you wish to recover in the Protected Data box. The bold days in the calendar indicate there are available recovery points (Figure 3). Select the Latest from the Recovery time drop-down box. Click Recover in the Actions pane to launch the Recovery Wizard.
Figure 3: Selecting a storage group recovery point
- Review the recovery selection and click Next (Figure 4). Select Recovery to original Exchange Server location and click Next (Figure 5). Notice that the Copy to tape is disabled because we don't have any tapes configured. The option to Copy to a network folder will only be available if you select any other recovery point except the latest.
Figure 4: Review Recovery Selection
Figure 5: Select Recovery Type
- On the Specify Recovery Options page, select Mount the databases after they are recovered. If you want DPM to send a notification when the recovery process is finished, select the Send an e-mail when this recovery completes check box and enter one or more e-mail addresses (Figure 6). Click Next.
Figure 6: Specify Recovery Options
- Now we must swap to the Exchange Server in order to allow the databases to be overwritten by the restore. If you miss this step, the restore will fail. Open your Exchange Management Console, navigate to the storage group, right-click on each Exchange mailbox database in the storage group and select Properties. Select the This database can be overwritten by a restore check box and click OK (Figure 7).
Figure 7: Database Properties
- Back to the DPM Administrator Console, review your selected settings on the Summary page (Figure 8) and click Recover. When the recovery is complete, click Close (Figure 9). If you skip the previous step, you'll get a Critical Alert (Figure 10).
Figure 8: Recovery Summary
Figure 9: Recovery Status
Figure 10: Recovery Failure
Now that the recovery process has ended, let's take a look at the Exchange data files on disk. Using Windows Explorer, we can see that the correct .edb files were restored (Figure 11). Also notice the original files, which have been renamed.
On the Application Event Log we see a lot of ESE events related to the logfile replay (Figure 12).
The final test was to open the Administrator mailbox and see if the messages received after 5:00 PM were available. After logging on to the OWA, everything looked like there was no loss at all (the picture from OWA is exactly the same as Figure 1).
Figure 11: The restored database files
Figure 12: Replaying logfile
The process of recovering a Storage Group to a Network Folder is very similar to the previous one:
- Open DPM Administrator Console, click Recovery on the navigation bar and browse to the storage group you wish to recover in the Protected Data box. Click any bold date in the calendar, select the desired recovery point from the Recovery time drop-down box and click Recover in the Actions pane to launch the Recovery Wizard.
- Review the recovery selection and click Next. Select Copy to a network folder and click Next (Figure 13).
Figure 13: Select Recovery Type
- On the Specify Destination page (Figure 14) browse for destination path to recover the storage group files to (Figure 15). You can only select computers that have the DPM agent installed. Click Next.
Figure 14: Specify Destination
Figure 15: Specify Recovery Destination
- If there are files in the recovery location that have the same names as the files to be recovered, you will be warned that they will be overwritten. On the Specify Recovery Options page, notice the difference from Figure 6. Since we're recovering the storage group to a file system, we have the option to Restore security. If you want DPM to send a notification when the recovery process is finished, select the Send an e-mail when this recovery completes check box and enter one or more e-mail addresses. Click Next. Review your selected settings and click Recover. When the recovery is complete, click Close. You can then browse to the location specified previously and check that the files have been restored (Figure 17).
Figure 16: Specify Recovery Options
Figure 17: Restored storage group files
Recovering a Mailbox Database
You can recover the mailbox database to its original location, to a designated network folder, to a Recovery storage Group or to a different Exchange Server. If you wish to recover the mailbox database to its original location, you must select the latest recovery point.
To recover a Mailbox Database to its original location, follow these steps:
- Open DPM Administrator Console and click Recovery on the navigation bar. Browse to the mailbox database you wish to recover in the Protected data box. Click any bold date in the calendar, select the Latest recovery point from the Recovery time drop-down box and click Recover in the Actions pane to launch the Recovery Wizard (Figure 18).
Figure 18: Selecting a mailbox database recovery point
- Review the recovery selection and click Next. Select Recover to original Exchange Server location and click Next (Figure 19).
Figure 19: Select Recovery Type
- If you want DPM to send a notification when the recovery process is finished, select the Send an e-mail when this recovery completes check box and enter one or more e-mail addresses. Click Next. Review your selected settings and click Recover. When the recovery is complete, click Close.
The steps required to recover a protected mailbox database to an alternate location are pretty much the same as the ones to recover a storage group to a specified network folder, so I won¡¯t write about them.
There's also the option of restoring to a Recovery Storage Group, but since this option is required to restore a single mailbox, we'll talk about it a little bit ahead.
Recovering a Mailbox
Brick-level backups, the process of backing up and restoring individual mailboxes, are still used quite often. While this practice provides mailbox-level granularity, it is extremely slow, requires a great deal of storage, and breaks single instance storage, whereby a message or attachment is only held once per storage group.
If you follow some best practices, such as keeping deleted items and deleted mailboxes for a period of time, the probability that you'll ever need to restore a single mailbox is quite low.
You can recover deleted e-mail messages using Microsoft Outlook (for instructions, see "How to Recover a Deleted Item"). To recover a deleted mailbox, use the Exchange Management Shell or the Exchange Management Console (for instructions, see "How to Recover a Deleted Mailbox").
If you cannot recover the required information using the previous methods, such as when the retention period is expired, you can use DPM to recover the mailbox.
To recover a mailbox, DPM must copy the entire database because this is the recommended method that Exchange supports, as explained in Knowledge Base article 904845, "Microsoft support policy for third-party products that modify or extract Exchange database contents".
When you select a mailbox for recovery, you cannot select Latest as the recovery point, this functionality is not available for individual mailboxes.
The following steps demonstrate how to recover a protected mailbox:
- On the protected Exchange server, if you do not have an existing Recovery Storage Group, create one by using the Database Recovery Management tool (Figure 20). You can also use the New-StorageGroup cmdlet in Exchange Management Shell and create a recovery database in the Recovery Storage Group by using the New-MailboxDatabase cmdlet. Configure the recovery database to allow it to be overwritten by using the Set-MailboxDatabase cmdlet in Exchange Management Shell.
a) New-StorageGroup -Server E2K7 -LogFolderPath C:\RSG\ -Name RSG -SystemFolderPath C:\RSG\ -Recovery
b) New-MailboxDatabase -MailboxDatabaseToRecover 'E2K7\First Storage Group\Mailbox Database' -StorageGroup E2K7\RSG -edbfilepath 'C:\RSG\Mailbox Database.edb'
c) Set-MailboxDatabase -Identity 'E2K7\RSG\ Mailbox Database' -AllowFileRestore 1
Figure 20: Database Recovery Management
- Open DPM Administrator Console and click Recovery on the navigation bar. Browse to the mailbox database you wish to recover in the Protected data box and double-click on the mailbox database in the Recoverable Item field to display the list of available mailboxes. Click any bold date in the calendar, select a recovery point from the Recovery time drop down box and click Recover in the Actions pane to launch the Recovery Wizard (Figure 21).
Figure 21: Selecting a mailbox recovery point
- Review the recovery selection and click Next. Select Recover mailbox to an Exchange server database to recover the mailbox to its original server, or select Copy to a network folder to copy the database files to a separate folder location. Click Next (Figure 22).
Figure 22: Select Recovery Type
- On the Specify Destination window, specify the location to write the recovered mailbox database to (The Recovery Storage Group created in step 1), and click Next (Figure 23).
Figure 23: Specify Destination
- Specify if you want DPM to send an e-mail message when the recovery process is finished and click Next. Review your selected settings and click Recover. When the recovery is complete, click Close.
- After the recovery process finishes, we still don't have the required mailbox restored. What we have is the mailbox database where the mailbox belongs to restored to the Recovery Storage Group. On the protected Exchange server, we can list all the mailbox databases by running the GetMailboxDatabase cmdlet (Figure 24).
Using Windows Explorer we can browse to the location where the restored databases were placed (Figure 25).
Figure 24: Get-MailboxDatabase
Figure 25: Recovery Storage Group files
- The final step to restore the mailbox is to run a PowerShell cmdlet:
a) Restore-Mailbox -RSGMailbox 'Administrator' -RSGDatabase 'Recovery Storage Group\Mailbox Database' -id 'Administrator' -TargetFolder 'Restore'
If you now open the Administrator mailbox, all its contents until 5:00 PM are located beneath the Restore folder (Figure 26).
Figure 26: Administrator mailbox
After you complete the restore, the Recovery Storage Group should be dismounted. Again, you can use the Database Recovery Management Tool, or the following PowerShell cmdlets:
- Remove-MailboxDatabase ¨CIdentity "E2K7\Recovery Storage Group\Mailbox Database"
- Remove-StorageGroup ¨CIdentity "E2K7\Recovery Storage Group"
Finally, we can run the Get-MailboxDatabase cmdlet to check that the Recovery storage Group has gone (Figure 27).
Figure 27: Get-MailboxDatabase
Now that Data Protection Manager fully supports native Exchange backups, I consider it a great tool to protect your servers, providing you all the benefits we saw at part 1 of this series.
I like particularly the granular control I get, since I have the option to restore a storage group, a mailbox database or a single mailbox to its original location or to a different place.
And you, what's your favorite feature?
- System Center Data Protection Manager 2007 TechCenter
- TechNet webcast: "Protecting Exchange Server with Microsoft DPM 2007"
- Protecting Exchange Server with System Center Data Protection Manager 2007
- Working with Recovery Storage Groups in Exchange 2007
If you missed the previous parts in this article series please read: