How to recover Microsoft Exchange Server mailboxes with Recovery Storage Group?

On this page

Please note that Microsoft KB824126 explains how recovery storage groups work, and that the recovery group can not restore public folders.

Exchange 2007

In these procedures we will refer to the default “Mailbox Database” to be restored, but this can be any mailbox database.

We also refer to EXCHANGESERVER as the Exchange 2007 server holding the original database.

Other than these two items, please follow the directions exactly, even something as simple as restoring to a different location can cause the process to fail.

Create the Recovery Storage Group if your Exchange server has enough space available to hold the restored database.

If there is enough space to restore the databases to the same disk that contains the original storage group and there is enough space on the system disk to hold the database: Use the Exchange Troubleshooting Assistant (ExTrA).

Exchange 2007 › Exchange Management Console › ToolboxDatabase Recovery ManagementOpen Tool.

Click Go to Welcome Screen › Enter an identifying label for this activity: Create RSG › Server name: [exchange server name] › Domain controller name: [domain controller name] › Next › … wait.

Click Create a recovery storage group › select the storage group with the Mailbox data to restore › Next › Create the recover storage group.

Verify “Database (…) has been added into the recovery storage group” and “Successfully created the recovery storage group”.

If there is not enough space to restore the databases to the same disk that contains the original storage group or the system disk does not have the capacity to store the database: The Recovery Storage Group must be created on a different local disk.

If necessary, a USB disk can be attached to the Exchange server for this purpose.

Below, we will use z:\RSG as the drive and folder to hold the restored databases.

Open Exchange Management Shell.

Create the Recovery Storage Group (RSG).

If the Recovery Storage Group was already created on an inadequate disk, remove it first using ExTrA before running the following.

New-StorageGroup Recovery Server EXCHANGESERVER LogFolderPath "z:\RSG" SystemFolderPath "z:\RSG" Name "Recovery Storage Group"

Review the details of the created RSG.

Get-StorageGroup "Recovery storage group" | fl

Create a Recovery Storage Group database.

New-MailboxDatabase MailboxDatabaseToRecover "Mailbox Database" StorageGroup "EXCHANGESERVER\Recovery Storage Group" EDBFilePath "z:\RSG\Mailbox Database.edb"

Allow the Recovery Storage Group database to be restored.

Set-MailboxDatabase -Identity "EXCHANGESERVER\Recovery Storage Group\Mailbox Database" -AllowFileRestore \$true

Change the staging directory for the Backup and Restore Agent.

You need to log into the server as the account that the agent is running as (usually the local system account, you can check this by launching the agent configuration on the server and browsing to the service control tab).

Identify a path (could be a network share path or a drive, such as z:\Staging) with enough space to hold the staged restore files.

Create z:\Staging.

Log in as the user running the service (USER, below).

Start › right-click My ComputerPropertiesAdvancedEnvironment Variables › User variables for USERTMPEdit › Variable name: change TMP to RVXTMPOK.

User variables for USERNew › Variable name: TMP › Variable value: z:\StagingOKOK.

Services › Backup and Restore Agent › Restart.

Restore the Mailbox Database › Admin Console › JobsHistory › right-click the backup job › Browse and RestoreExchange › ESEBackup › click a storage group.

[x] LOGS [x] Mailbox Store (…)

Compare the combined size of each artifact with the space available on the Recovery Storage Group disk. Click Restore ServerActive Jobs › right-click restore job › Message Logs. Click RELOAD periodically until the job termination shows. If successful, it will report Restore OK.

If the staging directory for the Backup and Restore Agent was changed above due to space considerations, you may want to change it back for future restores to work without the temporary disk.

Merge or Export the restored Mailbox data.

Using ExTrA and Database Recovery Management, you can ‘Merge or copy mailbox contents’ from the Recovery Storage Group “Mailbox Database” to their original live mailboxes.

Using the Exchange Management Shell.

You can restore an entire mailbox to a different target mailbox as a subfolder.

For example, using the scenario above, the mailbox database “Mailbox Database” and the source mailbox of “Hermes T. Messenger”, I can restore that entire mailbox to “Hades O. T. Underworlds”s “Snoop/Recovered Data - Hermes T. Messenger - M/DD/YYYY H:MM:SS AM” folder with:

Restore-Mailbox -RSGMailbox "Hermes T. Messenger" -RSGDatabase "Recovery Storage Group\Mailbox Database" -id "Hades O. T. Underworld" -TargetFolder "Snoop"

If the folder does not show up immediately, shutting down and restarting Outlook can effectively refresh the folder list.

Restoring to an entirely new Mailbox is similar.

Restoring to the original Mailbox can be accomplished by leaving out the -RSGMailbox argument. In the example above, leaving it out would restore the “Hades O. T. Underworld” mailbox.

Having restored the mailbox data to an existing mailbox, another Exchange Management Shell cmdlet Export-Mailbox can be used to create a PST file for offline browsing and analysis. It is not possible to create a .PST file from a mailbox in a Recovery Storage Group, so restoring it to a live mailbox is first necessary.

In some clustered scenarios we have noticed that the following also needs to be done:

Please open the 64-bit RVXConfig tool on your Exchange server. As shown in the image below, please check the box and enter the name of your cluster in the field to Override the exchange server name on restore.

Exchange 2003

Exchange2003 › System Manager › Servers › right-click target server › New › Recovery Storage Group.

Ensure that the ‘Transaction log location’ and the ‘System path location’ reside on fixed-disk storage with enough space to restore mailbox store(s).

Exchange 2003 does not allow for the creation of a Recovery Storage Group on network shares.

Right-click Recovery Storage Group › Add Database to Recover › Select appropriate Mailbox Store › OK.

Admin Console › Jobs › History › right-click the backup job › Browse and Restore › Exchange › ESEBackup › click a storage group.

[x] LOGS [x] Mailbox Store (…)

Compare the combined size of each artifact with the space available on the Recovery Storage Group disk.

If there is more than twice the space available, the restore can succeed.

If there is less than twice the space.

Change the staging directory for the Backup and Restore Agent.

Identify a path (could be a network share path such as \\host\z\$\Staging or a drive, such as z:\Staging with enough space to hold the staged restore files. (Mapping a network share to a drive is known to not work, so just use the network share name.)

Create z:\Staging.

If the service is not running as the Local System user, login as the user running it (USER, below).

Start › right-click My Computer › Properties › Advanced › Environment Variables › User variables for USER › TMP › Edit › Variable name: change TMP to RVXTMP › OKUser variables for USER › New › Variable name: TMP › Variable value: z:\Staging › OK › OK.

Services › Backup and Restore Agent › Restart.

Click Restore.

Server › Active Jobs › right-click restore job › Message Logs.

Click RELOAD periodically until the job Termination: shows. If successful, it will report Restore OK.

With the Mailbox database restored, you may want to:

Recover Mailbox Data to the original Mailbox (for immediate reading).

This method merges all the backup Mailbox data into the live Mailbox.

Exchange2003 › System Manager › Servers › target server › Recovery Storage Group › Mailbox Store › Mailboxes.

Right-click a Mailbox › Exchange Tasks › Recover Mailbox Data › Next › Next › (x) Merge Data › Next › Next › Finish.

Extract a Mailbox PST for Offline Reading using ExMerge.

This method allows browsing and copying specific Mailbox items individually.

Download the ExMerge utility.

Recently found in Downloads for Exchange Server 2003 › Tools › Mailbox Merge Wizard (ExMerge) (English Only).

Run the self-extracting executable and extract them to a temporary folder.

Copy the ExMerge.exe and ExMerge.ini files to %Program Files%\Exchsrvr\bin.

Run %Program Files%\Exchsrvr\bin\ExMerge.exe › Next › (x) Extract or Import (Two Step Procedure) › Next › (x) Step 1: Extract data from an Exchange Server Mailbox › Next.

Microsoft Exchange Server Name: [same target server, above] › Next.

Check [x] RECOVERY STORAGE GROUP/MAILBOX STORE › Next.

Select individual mailboxes › Next › Next.

Using Explorer, create a folder to hold the PST files, such as in My Documents › Restore.

Change Folder › select the restore folder above › OK › Next.

You may want to save the settings for subsequent restores.

NextFinish.

Copy or Move the PST file for viewing with Outlook, if necessary.

Outlook 2007 › FileOpenOutlook Data File › open the PST file above.

Mailbox data will be found in !ExMerge - mailbox name.

Dismount the Store for Offline Extraction.

Exchange2003 › System Manager › Servers › target server › Recovery Storage Group › right-click Mailbox StoreDismount Store.

Troubleshooting

Errors in the job message logs

ESEBackup ERROR Could not add database error hxhxhxhx: Database not found.

This happens when an additional database is part of the restore set. For example, selecting an entire storage group, rather than individual Mailbox Stores, can inadvertently include databases not meant for restore, such as Public Folder databases.

The workaround is to choose only individual Mailbox Stores (typically a single store) and the logs when restoring.

error 70 native copying file C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\RSG20090728152228\Mailbox Database.edb

SERVER-FileIO JobId 2246: HrESERestoreComplete error: Error returned from an ESE function call (d).

This can be caused the by Exchange server’s disk running out of space. The Mailbox Database.edb file should be deleted immediately to allow the ongoing function of Exchange services.

Errors in the event viewer

Information Store (NNNN) RestoreNNNN: Unable to read page NNNNNN of database C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\RSGYYYYMMDDHHMMSS\Mailbox Database.edb. Error - 4001

This may be due to not enough space. See subsequent error message to confirm.

Other errors seems to have enough context to determine the cause.

Additional information

Event logs

During a restore, the following Event Log may be played:

The database engine is restore from backup. Restore will being replaying log files in folder, and continue rolling forward log files in folder.