Restore Microsoft Exchange Server 2003 and 2007

On this page

These instructions are basically the same for both Exchange 2003 and 2007. The end user interface is slightly different but they work the same.

Restore messages only

If an entire Exchange server or a users mailbox has been completely lost or deleted, it must be recreated with the same name as the original before trying to restore any message.

Follow these steps to restore an entire mailbox, a subfolder or a specific message:

  1. Browse the client from the ClientsSummary list or browse a specific job in JobsHistory.

  2. In the Restore File Browser, click the EXCHANGE:/ directory to browse it.

    At least two directories should be visible: ESEBackup/ and MBXBackup/. ESEBackup contains storage groups and stores. MBXBackup contains the individual mailboxes to be browsed to find specific messages.

    Top-level folders differ slightly between Exchange 2003 and Exchange 2007, but the mailboxes and subfolders and message can be found easily by browsing into them.

    Restoring a single message mailbox is the same as restoring regular files.

  3. Check the box to the left of the message you want, and click Apply.

    A plus sign will be added next to the folder(s) you selected.

  4. Click Restore.

  5. To restore all the messages in a folder, select the folder and click Restore.

The restore options in the RVXConfig window control how existing message are handled during a restore.

  • SKIP, skips restoring any messages that already exist.

  • DUPLICATE, restores the message as it was backed up, and leaves the existing message alone.

  • OVERWRITE, restores the message as it was backed up, and removes the existing message.

Restore Exchange Server database to original location

If a store has been completely lost or deleted, it must be recreated using the same path and name before trying to restore it.

Follow these instructions for restoring an entire Exchange database:

If an entire Exchange server has been lost, it must be rebuilt and named exactly the same as the original.

  1. Right-click the store name, and select Properties.

    Ensure the option allowing the database to be overwritten by a restore is checked.

  2. Dismount the Exchange database to be restored.

    Right-click the store name in the System Manager (e2k3) or Exchange Management Console (e2k7), and select the Dismount Store option. Make sure the properties option to allow the database to be overwritten is selected.

  3. Purge any existing logs.

    They will need to be “replayed” and if there is anything newer or conflicting, the restore will not work.

  4. Browse the client from the ClientsSummary list or browse a specific job in JobsHistory.

  5. In the Restore File Browser, click the EXCHANGE:/ directory to browse it.

  6. Click the checkbox to the left of the ESEBackup directory.

  7. Click Restore.

You can also browse further into the ESEBackup directory and select a specific file to restore.

Restore Exchange Server database using Recovery Storage Group

See knowledge base article Restore Exchange Mailbox Stores with Recovery Storage Group. Please note that Microsoft KB824126 explains how recovery storage groups work, and that the recovery group can not restore public folders.

Restore Exchange Server database to alternate location

It is recommended to use Recovery Storage Group for a mailbox database.

Otherwise, for either a mailbox or public folder database, for each database in the storage group, ensure: System Manager/Exchange Management Console › browse to storage group › inspect the Properties › Database › ensure Allow database overwrite by restore is cleared.

In the message log for the restore job, the agent will print out the temporary directory where the database files are temporarily being staged to. Since you have not enabled overwrite database with restore, Exchange will refuse to do the online restore, and the restore job will fail with an error—this is expected.

You can then look in the directory listed in the job message log for the files.

Troubleshooting

Relocate staging files

If the system drive does not have enough space, then on the client:

  1. Identify a path (could be a network share path or a drive, such as D, below) with enough space to hold the staged restore files.

    The restore will fail if using a network path. This is sometimes desirable to obtain intermediary files.

  2. Create D:\RvxTemp.

  3. Sign in as a user running the service.

  4. Start › right-click My Computer › Properties › Advanced › Environment Variables › User variables for USER › TMP › Edit.

    1. Variable name: change TMP to RVXTMPOK.

    2. User variables for USER › New › Variable name: TMP › Variable value: D:\RvxTempOKOK.

    3. Restore the Exchange job.

  5. Environment Variables › User variables for USER › TMP › Delete.

  6. User variables for USER › RVXTMP › Edit › Variable name: TMPOKOK.

  7. Delete the D:\RvxTemp directory and its contents.

Existing log file is not contiguous

HrESERestoreComplete error: Existing log file is not contiguous.

If logs exist in the directory, they need to be deleted. So effectively you must restore an entire storage group even with a full, since deleting the log files will render non-restored databases in the same storage group dysfunctional.

Microsoft recommends you do a full backup of the storage group before doing the restore which truncates the logs. Exchange 2007 management is different than 2003 and looks like it is pickier.

Error returned from callback function

HrESERestoreOpen failed: Error returned from a callback function call (0xX).

This may be due to having an Exchange cluster, particularly in Exchange 2007. Backups in a cluster are performed from individual servers, but restores must be directed to the virtual server.

If your exchange server is a Virtual Server named VIRTUAL, do the following:

  1. On the Exchange server with the database you want to restore, open Configure Backup.

  2. Select the Exchange Database Backup tab.

  3. Select Override exchange server name on restore.

  4. In the text box below that, enter VIRTUAL as the server name.

  5. Apply the changes.

  6. On the Service Control tab, click Stop, and then click Start (restarting the service).

  7. Try the restore again.

This may also be due to a database in an unclean shutdown state (powered off using the power button or unplugging the appliance).

Flat-file copying of Exchange Server database

One of the best techniques Exchange experts use when working to recover corruption in a database is to make a flat-file copy of the Exchange databases. A flat-file copy is merely an exact copy of the Exchange databases copied to another portion of the server hard drive or to another server. To do a manual copy of the databases, do the following:

  1. Dismount the Exchange database stores by going into the Exchange System Manager.

  2. Traverse the tree past Administrative Groups, Servers, Storage Group.

  3. Right-click the mailbox store, and select Dismount Store.

  4. Dismount the store for all mailbox stores you will be working on.

  5. Copy (using Windows Explorer, or XCOPY) the .edb files to a safe location.

If the databases need to be manually restored, a simple XCOPY (or Windows Explorer copy) of the databases back to the original subdirectories will bring the data back to the condition the databases were in at the time the databases were copied off the system. If the Exchange databases were properly dismounted before they were copied, the logs would have already been committed to the database and the database can be remounted exactly where it left off.