Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2007-11-16

This topic explains how to use the Microsoft Exchange Server 2007 recovery storage group (RSG) to recover a mailbox.

Before You Begin

To perform the following procedure, the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group to create and manage the RSG and to access data in the restored mailbox.

  • Exchange Recipient Administrator role on the server that holds the target mailbox.

For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.

Servers are part of a single forest or resource forests. Mailbox data can only be exported to mailboxes within the same forest. The Active Directory directory service accounts associated with the mailbox can be in an external forest, but mailbox data cannot be exported to servers in different forests.

Only Exchange 2007 databases are supported as recovery databases, and only Exchange 2007 is supported as a destination server for recovered mailbox data.

The Restore-Mailbox cmdlet can only use disconnected mailboxes as a source of data and connected mailboxes as a target for data.

Procedure

To merge a recovered mailbox using the RSG

  1. If an RSG does not already exist, you can create one by running the following Exchange Management Shell command:

    Copy Code
    new-storagegroup -Server <Server_Name> -LogFolderPath <path_to_Logfiles> -Name <RSG_Name> -SystemFolderPath  <Database_Path> -Recovery
    
  2. Add a recovery database to the RSG by running the following Exchange Management Shell command:

    Copy Code
    new-mailboxdatabase -mailboxdatabasetorecover <Database_Name> -storagegroup <Server_Name>\<RSG_Name> -EDBFilePath <Database_Path>
    
  3. Set the recovery database to allow overwrites by running the following Exchange Management Shell command:

    Copy Code
    set-mailboxdatabase -identity <Server_Name>\<RSG_Name>\<Database_Name> -AllowFileRestore:$True 
    
  4. Mount the recovery database by running the following Exchange Management Shell command:

    Copy Code
    mount-database -identity <Server_Name>\<RSG_Name>\<Database_Name>
    
  5. Recover the mailbox of an existing user to an existing mailbox by running the following Exchange Management Shell command:

    Copy Code
    restore-mailbox -identity <User_name> -rsgdatabase <Server_Name>\<RSG_Name>\<Database_Name> 
    

Examples of Commands to Recover User Data

The following are examples of commands that can be used to recover user data from an RSG:

  • To recover one mailbox from the RSG database to the currently used mailbox 'John Smith', run the following Exchange Management Shell command:

    Copy Code
    Restore-Mailbox -identity 'John Smith' -RSGDatabase 'RSG\mailbox database'
    
  • To recover all mailboxes in the RSG to their respective active mailboxes, run the following Exchange Management Shell command:

    Copy Code
    Get-MailboxStatistics -database 'RSG\Mailbox Database' | restore-mailbox
    
  • If you want to restore a mailbox in an RSG into a different active mailbox, run the following Exchange Management Shell command:

    Copy Code
    Restore-Mailbox -RSGMailbox 'John Smith' -RSGDatabase 'RSG\Mailbox Database' -id 'Allison Brown' -TargetFolder 'JSmith Email'
    
  • To recover end-user data between two dates, run the following Exchange Management Shell command:

    Copy Code
    Restore-Mailbox -RSGMailbox 'John Smith' -RSGDatabase 'RSG\Mailbox Database' -id 'Allison Brown' -TargetFolder 'JSmith Email' -StartDate '02/02/05' -EndDate '02/05/05'
    

For More Information

For general information about doing restores, see How to Perform a Basic Restore of Exchange Databases.