Restoring Directory or Information Store Data

Because of directory addressing constraints, a directory can be restored only to the server from which it was backed up. An information store can be restored to an alternate server. The backup application should be capable of selecting the appropriate paths to restore the files to the appropriate paths because they may have been reconfigured since the backup, or, in the case of the information store, the server may be different.

    To restore data
  1. Shut down the service that is being restored. The directory service is MSExchangeDS, the information store is MSExchangeIS. The application can also have the user stop the services manually through the Services applet of the Windows NT Control Panel.
  2. Call HrRestorePrepare to obtain a restore context.
  3. Call HrRestoreRegister to interlock subsequent restore operations and prevent the service from being started until you have completed the restore.
  4. Copy the files off the backup medium onto the destination server. To find out the location where the files should be restored, call HrRestoreGetDatabaseLocations. Match the tokens that were returned by HrBackupGetBackupLogs and HrBackupGetDatabaseNames at backup time with the tokens preceding the directories returned by HrRestoreGetDatabaseLocations. The programmer requires no knowledge of what type of files are backing up and where they are being restored beyond this token matching technique. For examples of the data returned by these functions, see Backup File Locations.
  5. Before the service starts, you must call HrRestoreRegisterComplete and specify the status of the restore operation. If the status is not successful, the service will not start until a valid database has been restored. This completes the restore operation and allows the service to start.
  6. Start the service or allow the user to start the service manually.