Backing Up Exchange Server 2003 Databases

 

The mailbox store and public folder store data in your Exchange 2003 databases and transaction log files are the most important data to back up in your Exchange organization. You can use an Exchange database backup to restore damaged mailbox or public folder stores to a functioning server that is running Exchange 2003. You can also use Exchange database backups to restore your Exchange databases to a different server. For more information about how to restore Exchange databases to a different server, see "Restoring Exchange Databases to Another Server."

Backing Up Remote Exchange Server 2003 Databases

For the backup utility (Backup) in Windows Server 2003 to successfully back up the databases of an Exchange 2003 server, you must run it on a computer that meets at least one of the following requirements:

  • The Microsoft Exchange Messaging and Collaboration Services component has been successfully installed on the computer.

  • The Microsoft Exchange System Management Tools component has been successfully installed on the computer. (This is typically referred to as an admin only Exchange installation.) For information about installing the Exchange System Management Tools, see "Preparing to Administer your Exchange Server 2003 Environment" in the Exchange Server 2003 Administration Guide.

  • The computer must be manually configured to make remote backups of Exchange databases. For the manual configuration steps, see Microsoft Knowledge Base article 275876, "XADM: How to Use NTBackup from a Non-Exchange 2000 Computer."

If your computer meets at least one of these requirements, an option named Microsoft Exchange Server appears on the Backup tab in Backup. This option shows you all the Exchange servers in the forest that you are connected to. If you do not see this option on the Backup tab, use the Remote Store option on the Tools menu to manually connect to an Exchange server that is on the network. For detailed instructions, see How to Use the Remote Store Option in Backup.

Assuming that the account that you are logged into has the necessary permissions to back up the server, you will populate the Microsoft Exchange Server option on the Backup tab with all the servers in the Exchange organization. In this way, you can add servers from multiple Exchange organizations to the list of servers that you can back up. This is especially useful for a dedicated backup server that is used to back up databases in multiple Exchange organizations.

Note

If there is a similar option named only Microsoft Exchange above the Microsoft Exchange Server option, you can ignore it. This option is only for backing up Exchange databases on Exchange 5.5 or earlier versions.

If you still cannot connect to any Exchange servers or see any in the list, make sure that you have logged in to an account that has the required permissions to back up the server. If the problem persists, see the information in Microsoft Knowledge Base article 275676, "XADM: Troubleshooting a Remote Online Backup of Exchange 2000."

How Exchange Server 2003 Backup Works

This section explains the online backup process step-by-step.

Normal (or Full) Backups

The following is a step-by-step description of the normal (or full) backup process.

  1. The backup agent establishes communication and initializes a backup with the MSExchangeIS service on the target Exchange server. (In Exchange 5.5, the backup was established with the Microsoft Exchange System Attendant (MSExchangeSA) service process.)

  2. The checkpoint does not advance while the backup is running. New changes will still be accepted and written to the database files, but the checkpoint will not move again until the backup ends.

  3. The first log that must be copied to tape with the backup is recorded in the database header in the Current Full Backup section. This might not be the current checkpoint log, depending on the backup status of other databases in the storage group.

  4. Copying the database files to tape begins. Page changes made to the database during backup that cannot be reconstructed fully from the log files are not flushed to the disk during backup. (In versions of Exchange earlier than Exchange 2000 Server Service Pack 2 (SP2), these changes are stored in a .pat file that is in the same location as the database file. The .pat file is copied to tape after the database files have finished being copied, and then it is deleted.)

    Note

    In Exchange 2000 Server SP2 and later, there is no patch file. Instead, a single extra page is constructed and appended to the very end of the .edb file. This page is a mini header that contains information about the transaction log files needed to recover this database. It overrides the Log Required field in the database header, although it will often list the same log range.

    If you run Eseutil /MH on a database that has been restored from an online backup, but on which recovery has not yet run, you will see the mini header information displayed as the Patch Current Full Backup section.

    The current Enn.log file is forced to roll over immediately after all database files have been copied to tape. This happens regardless of how full the log is.

    The reason that the log is forced to roll over is that log files cannot be backed up while they are open. The log needs to be on tape, because it contains operations applicable to the databases that were just backed up. Therefore, the log is closed so that it can be appended to the tape. You will never see a log file called Enn.log in an online backup set. Only closed, numbered log files are backed up.

  5. The range of logs needed to reliably recover the backup are copied to tape. These will include at least all the logs starting from the point that the backup was initiated (at the checkpoint stopped advancing) up through the log that was just forced to close.

    Note

    If all databases are mounted in the storage group and all databases have been selected for backup, this range of logs will only be from the checkpoint log to the highest available numbered log. However, if some databases are dismounted, or not all the databases are being backed up, the range of logs copied to tape might start before the current checkpoint. Exchange ensures that all logs needed for replay into the backed up databases will be present on the tape.

  6. Log files that no database in the storage group needs to roll forward beyond the backup logs are truncated (deleted from disk). The headers of all the databases in a storage group keep track of the last backup time for each database, and also which logs were required. If any database in a storage group is dismounted, its header will not be read and Exchange will make no calculations about which log files can be safely deleted.

  7. There are two factors that affect which log files will be truncated after a backup:

    • Databases can be backed up individually.

    • Not all databases in the storage group may be mounted at the time the backup occurs.

      If you back up some databases but not others in a storage group, only the transaction logs not needed by the database least recently backed up will be truncated. This means that if you never back up one particular database in a storage group, no transaction logs will ever be deleted. If you have two databases in a storage group, and you back up one of them on Tuesday and the other on Thursday, the Thursday backup will truncate logs only up to Tuesday. If you then back up the Tuesday database on Friday, the logs from Thursday will be truncated.

      Note

      If any database in a storage group is dismounted at the time of backup, no log files will be truncated.

  8. The Previous Full Backup section of the database header is updated to reflect the time and log range of the backup that just completed.

Copy (or Full Copy) Backups

A copy backup is the same as a normal backup, except that the last two steps of truncating the logs and updating the Previous Full Backup section of the header are not done.

Incremental Backups

The following is a step-by-step description of the incremental backup process:

  1. The backup agent establishes communication and initializes a backup with the MSExchangeIS service on the target Exchange server. (In Exchange 5.5, the backup was established with the MSExchangeSA service process.)

  2. The checkpoint does not advance while the backup is running. New changes will still be accepted and written into the database files, but the checkpoint will not move again till the backup ends.

  3. The current Enn.log file is forced to roll over regardless of how full the log is. The reason that the log is forced to roll over is that log files cannot be backed up while they are open. Therefore, the log is closed so it can be appended to the tape. You will never see a log file named Enn.log in an online backup set. Only closed, numbered log files are backed up.

  4. When you perform a normal or copy backup, the log file is rolled over near the end of the backup, after the databases have all been copied to tape. For an incremental backup, the rollover happens at the very beginning.

  5. All existing numbered log files are copied to tape.

  6. Log files that no database in the storage group needs to roll forward are truncated (deleted from the disk).

  7. If any database in a storage group is dismounted at the time of backup, no log files will be truncated.

  8. The Current Incremental Backup section of the database header is updated to reflect the time and log range of the backup that just completed.

Differential Backups

A differential backup is similar to an incremental backup, except that the last two steps of truncating the logs and updating the Current Incremental Backup section of the header are not done.

Note

One of the most important daily tasks of an Exchange administrator is to examine the application event log and verify that backups have completed successfully. Microsoft Product Support Services frequently receives calls from customers who are experiencing problems because their backups have been failing for weeks, and they did not notice it. Failed backups are not the only problem that will arise if you do not verify the success of your backups. A backup job that never completes leaves the checkpoint in a state where it will fail to advance and will appear to be frozen. If a server crashes, the transaction log replay time after the crash can be extended up to several hours. In Exchange 2003, if the checkpoint is more than 1,000 log files behind, Exchange will automatically dismount the Exchange store. In previous versions of Exchange, the dismount will occur at approximately 256 logs.

The Exchange 2003 backup process

4c24f8a3-d900-4ef5-b702-1756338afbbf

Backing Up Exchange Server 2003 Databases

For detailed instructions about backing up Exchange 2003 databases, see How to Back Up Exchange Server 2003 Databases.