Please note: Microsoft KB 824126 explains how recovery storage groups work, and that the recovery group can not restore public folders

Exchange 2007

  • In these procedures we'll 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, depending on whether 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).Exchange2007 > Exchange Management Console > Toolbox > Database Recovery Management > Open 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'll use z:\RSG as the drive and folder to hold the restored databases.
      • Open Exchange Management Shell
        1. 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"
        2. Review the details of the created RSG
          • Get-StorageGroup "Recovery storage group" | fl
        3. Create a Recovery Storage Group database
          • New-MailboxDatabase MailboxDatabaseToRecover "Mailbox Database" StorageGroup "EXCHANGESERVER\Recovery Storage Group" EDBFilePath "z:\RSG\Mailbox Database.edb"
        4. 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 Infrascale 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 config on the server and browsing to the service control tab)
        1. Identify a path (could be a network share path or a drive, such as z:\Staging, below) with enough space to hold the staged restore files
          • Create z:\Staging
        2. Log in as the user running the service (USER, below)
        3. 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 > Infrascale Backup and Restore Agent > Restart
  • Restore the Mailbox Database< > Infrascale 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.Click 'Restore'Server > Active Jobs > right-click restore job > Message LogsClick RELOAD periodically until the job Termination: shows. If successful, it will report Restore OK
  • If the staging directory for the Infrascale 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 sub-folder. 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've 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

  1. 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
  2. Infrascale 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 Infrascale Backup and Restore Agent
          1. Identify a path (could be a network share path such as \\host\z\$\Staging or a drive, such as z:\Staging, below) 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
          2. If the Infrascale service is not running as the Local System user, login as the user running it (USER, below).
          3. 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 > Infrascale 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
      • Next > Finish
      • Copy or Move the .PST file for viewing with Outlook, if necessary.
      • Outlook 2007 > File > Open > Outlook 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 Store (...) > Dismount Store

Troubleshooting

Errors in 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 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 Info

Event Logs

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

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