Share via


How to Restore a Mailbox Database to a New Server with Database Portability

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

This topic explains how to use the database portability feature in Microsoft Exchange Server 2007 to mount a mailbox database on a server other than the server on which the database was created. For more information about database portability, see Database Portability.

Note

Database portability can be used only for mailbox databases. It cannot be used for public folder databases.

Before You Begin

To perform the following procedure, the account you use must be delegated the Exchange Server Administrator role and local Administrators group for the target server. For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.

Procedure

To use database portability to move a mailbox database to a different server

  1. Before moving a mailbox database to a new server, the database needs to be in a Clean Shutdown state. If the database is in a Clean Shutdown state, proceed to Step 2. Otherwise, perform the following soft recovery step:

    Note

    When you perform a soft recovery, any uncommitted log files are committed to the database. If you do not have all of the required log files, you will not be able to complete the soft recovery process. Proceed to step 2.

    • To commit all uncommitted log files to the database, from a command prompt, run the following command:

      ESEUTIL /R <Enn>
      

      Note

      <Enn> specifies the log file prefix for the storage group that contains the database into which you intend to replay the log files. The log file prefix specified by <Enn> is a required parameter for Eseutil /r. You can run the following Exchange Management Shell command to determine the log file prefix of a storage group:

      Get-StorageGroup <Server_Name>\<StorageGroup_Name> | fl LogFilePrefix
      
  2. Before you can mount the database, you must create the database on the new server. Select the storage group that will contain the database, and then create the database using the following Exchange Management Shell command:

    New-MailboxDatabase -StorageGroup <Server_Name>\<StorageGroup_Name> -Name <Database Name> 
    

    Note

    To create a new storage group, see How to Create a New Storage Group.

  3. Set the This database can be over written by restore attribute by running the following Exchange Management Shell command:

    Set-MailboxDatabase <Database Name> -AllowFileRestore:$true
    
  4. Move the database files (.edb files, log files, and Exchange Search catalog) to the appropriate location. The database files need to be present and in the correct location on the new server.

  5. Mount the database using the following Exchange Management Shell command:

    Mount-Database <Database Name>
    
  6. After the database is mounted, modify the user account settings with the Move-Mailbox -ConfigurationOnly command so that the account points to the mailbox on the new mailbox server. To use the Move-Mailbox cmdlet to move all of the users from the old database to the new database, run the following Exchange Management Shell command:

    Get-Mailbox -Database <SourceDatabase> |where {$_.ObjectClass -NotMatch '(SystemAttendantMailbox|ExOleDbSystemMailbox)'}| Move-Mailbox -ConfigurationOnly -TargetDatabase <TargetDatabase>
    

    Note

    If there was a new mailbox that had no mail or had not been opened, this command would not move the mailbox because it does not exist in the store.

After the Active Directory directory service replication has completed, all users can access their mailboxes on the new Exchange server. Clients can connect to the new server as follows:

  • Microsoft Office Outlook 2007 clients will be redirected via the Autodiscover service.

  • Outlook Web Access users will be automatically redirected to the new server.

  • Older Outlook clients will need to be manually configured to point to the new server, if the server name has changed.

For More Information

For more information about Autodiscover, see Managing the Autodiscover Service.

For more information about the Move-Mailbox cmdlet, see Move-Mailbox.

For more information about the Get-Mailbox cmdlet, see Get-Mailbox.