Restore and Recovery Operations

As with backup operations, software developers should follow the procedures outlined in the Volume Shadow Copy Service SDK Overview and Reference Guide to restore and recover Microsoft Exchange Server 2010 database and storage groups.

Exchange 2010 Store Writer includes increased flexibility for restoring databases. Prior to Exchange 2007, shadow copy restores were supported only if restores were targeted to the exact same file paths. With Exchange 2010, shadow copy backups taken with any of the Exchange Writers, the Store Writer or the Replication Writer, can be restored with Store Writer and targeted to:

  • The original database irrespective of whether the database or transaction log file path configurations has been modified or not

  • The recovery database

  • Any production database without requiring the database display names to match the backup set

  • Non-Exchange directory paths

Exchange 2010 does not rely on the act of mounting the database to replay transaction log files into the restored database. Instead, the Store Writer offers backup applications to request recovery to be run as part of OnPostRestore() by the Exchange Store Writer itself.

The Exchange 2010 Store Writer also improves pre-restore and post-restore verification checking, and changes the way that applications designate target database locations.

The Store Writer calls the GetRestoreOptions() method to obtain the settings made by the application by using the SetRestoreOptions() method. The application calls the SetRestoreOptions() method when the target location of the restore is different than the location where the backup was originally created. The backup application can also set the restore file paths by using the AddNewTarget() method. If the application does not specify a different restore location by using the SetRestoreOptions() or AddNewTarget() methods, the writer restores the files to the locations specified in the backup set. If the file paths and GUIDs are not the same as those found in the Active Directory® directory service for the target database, the writer will return an error.

When the backup application restores information to the original location of the database, the log files must be restored to the directory path specified in Active Directory for that database. If the application restores a database to a different location, the log files must be restored to a folder named _restoredLogs that is located inside the database log file directory.

When restoring to a server, or database that is different from where the backup originated, the backup application must make sure that the database directory paths provided to VSS match those in Active Directory. Information about existing databases can also be obtained by using the new get-StorageGroup, get-MailboxDatabase, and get-PublicFolderDatabase PowerShell commands.

When using the Exchange Server 2010 Replication Writer for backup, the application must use the Store Writer to restore the database and log files. The application uses the SetSelectedForRestoreEx() to set the writer to use when restoring the data.

In addition, the backup application can use the SetAdditionalRestore() API to instruct the Exchange Server 2007 writer to replay the log files after restoring the database and log files. When restoring from multiple backup sets, the application must call SetAdditionalRestore() for each restore operation except for the last one. Calling SetAddtionalRestore() prevents the Exchange Server 2010 writer from replaying the logs immediately after the restore. When performing the last restore, the application should not call SetAdditionalRestore(), so that the computer running Exchange Server 2010 will replay all the log files after that last file restore completes.