Using Recovery Storage Group in Exchange 2007

Recovery Storage Group (RSG) has been operational since Exchange 2003 SP1 and gives us the ability to restore a single mailbox or a single item from a backup, using the simplest backup software like Ntbackup, without using expensive backup tools like brick level agents and while the production Database is up and running.

There are some major and significantly good changes in the Exchange 2007 RSG in comparison to the Exchange 2003 RSG and most of them are as a result of the powerful power shell capabilities.
In this article I will describe, step by step, how to configure RSG and how to restore an item or a mailbox from backup.
Requirements and naming conventions
For the purpose of this article, I’ve used the following objects:

  • SQA-LCS2005 – Exchange 2007 standard edition.
  • Administrator – Source & destination mailbox on SQA-LCS2005 to restore the selected items from the RSG.
  • Backup software – Ntbackup (C:’Backup’ExchDB.bkf – is the backup device that I used).

The process is divided into 4 parts:

  1. Having a backup of the DB, a backup that contains the items that were deleted.
  2. Create the RSG in the Exchange server.
  3. Restore the relevant items / mailbox – Using GUI.

Optional: Restore the relevant items / mailbox – Using MSH.

  1. Dismount and remove the RSG.

Having a backup of the DB, a backup that contains the items that were deleted
Note that the backup process usually should run every day automatically; therefore you may skip this step.
Open the Ntbackup software, mark the DB you want to backup and verify that the backup completed successfully:

Create the RSG in the Exchange server

  1. Open the EMC (Exchange Management Console), from the Toolbox node, click on the Database Recovery Management:

  1. Type the name of your Exchange server and Domain Controller server name and then click Next at the bottom of the screen:

  1. From the Tasks options, choose Manage Recovery Storage Group and then click on the Create a Recovery Storage Group:

  1. Select the Storage Group that you want to restore from and click Next:

  1. Choose the location of the original SG files (DB + Logs).

  1. Finish the RSG creation.

  1. Verify that the RSG was created using the Exchange Management Shell (MSH):


Restore the relevant items / mailbox – Using GUI
Note that the Administrator mailbox, before the emails deletion, looks as follows:

  1. The first step in this section is restoring the DB from the backup.Open the backup software and choose the DB you want, and marked it to restore:

  1. Mark the next parameters, as shown in the next screen:

  1. Verify that the restore completed successfully.
  2. After the restore completed successfully, click the Merge or copy mailbox contents from the Manage Recovery Storage Group:

  1. In the mounted Database in the RSG that you restored, click Gather Merge information:

  1. The next screen gives you the ability to restore the whole mailbox or all the items in the mailbox from the backup in a simple way by clicking the Perform pre-merge tasks:

  1. If you want to filter the items that you want to restore, like items from a specific range of dates, restore the items with a specific subject from all mailboxes to a specific mailbox – you should select the Show advanced Options:

Note: In this example I have chosen to restore all the items with the word TEST (the search is not case sensitive) to the Test_Folder folder in the Administrator’s mailbox.
Search by subject (TEST) and copy all the items that will be found to the Administrator’s mailbox:

Search the TEST word in the next mailboxes:

  1. The result of the process, is shown in the next screen:


  1. We can see all the folders that were created in the Administrator’s mailbox under the TEST_Folder (for each user’s mailbox – Recovered Data – Username – Date of restore): For example: Recovered Data – Tzahi Kolber – 2/22/2007


Optional: Restore the relevant items / mailbox – Using MSH
The alternative way to restore items from specific dates, specific subjects and from user’s mailboxes, is using the Exchange Management Shell (MSH). In the following examples, I will demonstrate how to restore items that were deleted from the Administrator’s mailbox.
Example 1:
The Goal:
Restore items (all items in mailbox) from Administrator mailbox in RSG back to the live mailbox, under the Restore folder:
The Command:

​[PS] C:'>restore-mailbox -RSGMailbox 'Administrator' -RSGDatabase 'Recovery Storage Group'Mailbox Database' -id 'Administrator' -TargetFolder ‘Restore’

Note: Any mailbox that is restored from RSG can be restored to any mailbox on the production Database. In this case, instead of restoring the data to back to the Administrator’s mailbox, we can restore it to Tkolber’s mailbox, by running the next command:

​[PS] C:'>restore-mailbox -RSGMailbox 'Administrator' -RSGDatabase 'Recovery Storage Group'Mailbox Database' -id 'Tkolber' -TargetFolder ‘Restore’

The Process:
19_Restore_to_Restore_Folder.gif
After running the command, you are asked to approve the process:

After approving the process, the tasks are shown in the background:

When the process ends, a summery of the process is presented on the screen:

The Result:
When the process ends, we can see the destination folder (Restore) in the user’s mailbox:
Example 2:
The Goal:
Restore items from Administrator mailbox in RSG, from January 15th to February 27th, back to the live mailbox, under the Date_Range_Jan15th to Feb27th folder:

  • In this process, we MUST configure a target folder, but if you didn’t write it in the command, you are asked to fill the target folder’s name.
  • The dates should be written as the following syntax: MM/DD/YY.

The Command:

​[PS] C:'>restore-mailbox -RSGMailbox 'Administrator' -RSGDatabase 'Recovery Storage Group'Mailbox Database' -id 'Administrator' -TargetFolder 'Date_Range_Jan15th to Feb27th' -StartDate '01/15/07' -EndDate '02/27/07'

The Result:
When the process ends, we can see the destination folder (Date_Range_Jan15th to Feb27th) in the user’s mailbox from the relevant dates only:

Example 3:
The Goal:
Restore all mailbox content from Administrator’s mailbox in RSG, back to the live mailbox:
The Command:

​[PS] C:'>restore-mailbox -id 'Administrator' -RSGDatabase 'Recovery Storage Group'Mailbox Database'

The Result:
When the process ends, all the data that was in the Administrator’s mailbox, merged into his production mailbox.

Dismount and remove the RSG
After you complete the restore from RSG, you should dismount the RSG, the main reason to do it is to enable the production DB (any live DB) restore.

  1. Open the EMC (Exchange Management Console), from the Toolbox node, click on the Database Recovery Management:

  1. Type the name of your Exchange server and Domain Controller server name and then click Next at the bottom of the screen:

  1. From the Tasks options, choose Manage Recovery Storage Group and then click on the Mount or Dismount Database in the Recovery Storage Group:

  1. Now select the Database that you want to dismount, mark it with V and click on Dismount Selected database:

  1. After dismounting the database, you will get a report with a result of the process:


In order to remove the RSG:

  1. Repeat steps 1 and 2 in this paragraph and from the tasks options, click on Remove the Recovery Storage Group:

  1. Click the Remove the Recovery Storage Group option again:

  1. After removing the RSG, you will get a report with a result of the process:

  1. If you want to verify from the Exchange Management Shell, that the RSG was removed, you can type the command: Get-MailboxDatabase –Status


Another Petri article on exchange database recovery is available also.