Now that you have a better idea how the Exchange databases are structured and data flows through the Exchange processes, you will be better able to understand the different backup methods used with Exchange and the requirements to back up the databases successfully. There are basically two types of Exchange backup: online and offline. Online BackupOnline backups are made while the Exchange 2003 services are running and use the Exchange streaming backup API. The Exchange 2003 online backup API automatically synchronizes and gathers the Exchange 2003 database and transaction log data that will be required for successful restoration using the same channel as normal database access. Although this can take longer than offline backups, it has the advantage of not interrupting users' use of email services, and as each 4K page is passed through the database engine to be written to backup media, its checksum is verified. Any error found is reported as a -1018 error, and the backup is terminated. Figure 13.8 shows a representation of the Exchange backup process. Figure 13.8. The Exchange backup process.There are four types of online backups of an Exchange database: normal, copy, incremental, and differential. In Exchange 2003 these processes are as described in the following sections. Normal (Full) BackupThe Backup application backs up the ESE database files (.edb and .stm) and at least one of the log files. On completion, the backup application deletes all committed log files indicated by the pointer in the checkpoint file. A patch page is then added to the database containing details of messaging transactions that occurred in Exchange while the backup process was running. Note that without circular logging, or an Exchange-aware backup process such as this, the log files would accumulate until all disk space was consumed. This is a common problem with badly configured and/or administered Exchange Servers. The steps in detail are as follows:
Copy BackupA copy backup is similar to the Normal backup with the exceptions that it does not delete the old log files and does not update the database headers to indicate that the backup has occurred. This can be useful for creating a rollback copy of the Exchange data prior to a restore or repair of the databases in the event that the restore or repair was unsuccessful. Daily BackupIn Exchange Server 2003 a daily backup is the same as a copy backup. Incremental BackupUnlike normal and copy backups where the current transaction log file is closed and sequenced after the databases have been copied, with incremental backups, it is rolled over at the beginning. All the sequentially numbered log files are then copied to the media, and those not required for successful database recovery are deleted for disk. The Current Incremental Backup section of the database header is then updated with the Date/Time and log range of the backup just completed. For an incremental backup to be useful in a disaster recovery you must have a normal or copy backup containing the ESE databases and an unbroken sequence of transaction log files. Differential BackupA differential backup is similar to an incremental backup with the exception that the old transaction log files are not deleted, and the Current Incremental Backup section of the database header is not updated. Offline BackupOffline backups are file-level backups made while the Exchange 2003 services are shut down or the data stores dismounted. It is highly recommended that you do not use offline backups except in special cases immediately prior to recovering databases. Their one advantage is that because they do not check data integrity during the backup process they can be performed in cases where an online backup may fail due to data corruption. To ensure the integrity of the data and transactions, including those in memory and as yet uncommitted to disk, you should use online backups. Security PermissionsThe user account that you are logged in to must have the requisite permissions or rights assigned when trying to back up or restore Microsoft Exchange data. Only those accounts with Domain Level Backup Operator rights can back up Exchange 2003 databases. To restore Exchange 2003 backups, the account must have full Exchange administrator rights for the domain. Table 13.2 lists the minimum account levels needed for backup and restore.
Note that you can assign users Domain Backup Operator permission without granting them full administrator rights. You can also use Run As to perform operations such as scheduled jobs in a security context other than that of the logged-on user. Table 13.3 lists the group memberships and backup and restore privileges assigned to various security groups.
Backing Up Exchange Using the SBS Backup WizardBy default, the SBS Backup Wizard automatically configures and schedules Microsoft NTBackup to perform a full, online, Exchange-aware backup of the server, which includes the Exchange stores and logs together with Windows System State and user data. There is no need (and in fact no option) to select the Exchange stores and logs when configuring the Backup Wizard. If you open the wizard-generated backup file in NTBackup, as shown in Figure 13.9, you will see that it included the Exchange Information Store First Storage Group. This is saved as C:\Program Files\Microsoft Small Business Server\Backup as Small Business Server Backup Script.bks in a default SBS install. Figure 13.9. SBS wizard-generated backup.By default SBS 2003 hides the Exchange Installable File System (IFS) drive, previously seen as the M virtual drive. If this is visible for any reason, you should add the entire drive to the list of file exclusions in the Backup Wizard. At the Storage Allocation for Deleted Files and Email screen, shown in Figure 13.10, you can configure the period of time Exchange retains deleted emails and mailboxes before flushing them from the system. Users and administrators can then recover these items during the retention period directly from disk without recourse to the backup media. Figure 13.10. Storage allocation for deleted files and email.Before setting the retention period, consider the following issues:
One thing to be aware of is that although the wizard-created backup uses the Volume Shadow Copy service in part, the Microsoft Exchange Server 2003 Writer for the Volume Shadow Copy service can conflict with NTBackup. If the Exchange Writer is enabled, it precludes the capability to simultaneously back up Exchange stores and System State. Microsoft has therefore disabled the Exchange Writer as part of the SBS setup. Using NTBackupThe SBS Backup Wizard configures a restorable backup set that includes System State as well as your Microsoft Exchange data stores and is the easiest and recommended way to back up SBS. The wizard is a wrapper around NTBackup and a number of other services, but you can configure these manually if you want. You can configure and run NTBackup independently depending on your plan and needs using either the GUI in the wizard or manual mode, or scripted via the command line. Windows Server 2003 Backup uses Volume Shadow Copy services (VSS) to back up System State, but backs up the Exchange Server stores directly. The System State Backup Shadow Copy Provider changes the state to Backup in Progress, and other processes cannot then access the Information Store. Exchange 2003 SP1 supports Volume Shadow Copy when used with backup tools that include an Exchange Server 2003 aware Volume Shadow Copy Service Requestor. Due to the lack of such a requestor in NTBackup you need to configure the backup independently of a System State backup. Some third-party software does include the requestor, however, and can back up System State and Exchange stores simultaneously using the Volume Shadow Copy service. Not all Exchange data that may be required for a successful restore is backed up with the System State. Exchange relies on IIS for its SMTP component and for Web Services for Outlook Web Access (OWA). Exchange stores the configuration data in Metabase Stores in IIS. By default, the data is stored in two files in the C:\WINDOWS\system32\inetsrv\MetaBack folder. The .MDn file, where n is a version number, holds the metadata, whereas the .SCn file holds the schema. You can create a one-time backup of these files using the GUI from the IIS Manager by selecting computer name, Action, All Tasks, Backup/Restore Configuration (as shown in Figure 13.11); then select Create Backup. You can then include these files in your Exchange backup, as shown in Figure 13.12. Figure 13.11. Back up IIS metadata.Figure 13.12. IIS metadata backup files.As stated previously, you should not back up the Exchange Installable File System (IFS, M) drive if it is visible. Neither should you back up the database or log files unless the databases are dismounted and offline. Although it is strongly recommended that you use only online Exchange-aware backups, you may have reason to do an offline backup. In that event, dismount both the Private and Public Folder Stores before backing them up. You should also exclude the directories containing the databases and the log files (by default, C:\Program Files\exchsvr\mdbdata\) from selection. It will be necessary to configure properties in the public and private folders that the SBS Backup Wizard would normally configure automatically. These include
Using ExMergeThe Exchange Server Mailbox Merge Wizard (ExMerge) is a powerful tool used to extract and import information from and to Exchange private mailboxes using Outlook .pst files. Since its creation in 1997 as a tool to remove Melissa virus-infected messages, it has grown into a sophisticated multithreaded application with considerable search and filtering capabilities on single or multiple mailboxes in a store. ExMerge can extract and copy, move, or delete messages by selecting or excluding folders by specific subject, by attachment name, or by date/time range. It can be used in a one- or two-step process from a GUI interface or command line and supports logging and scripted calls to a configuration (.ini) file.
The latest version of ExMerge supports Outlook Calendar, Contacts, Journal, Notes, Tasks, Views, and Folder rules. Although ExMerge works with both the First Storage Group and the Recovery Storage Group, it cannot extract data from Public Folders nor can it handle all data and metadata. Its search and filtering cannot find a string in a substring or an attachment to a message nested within another message. ExMerge requires Receive As and Send As permission for the mailboxes to be able to import and export information. The logged-on user Account must have Service Account Administrator permissions at the organization, site, and configuration levels of the Administrator program and have both permissions on the mailboxes. ExMerge is ideally suited to creating brick level (individual mailbox) backups and archives. Although it cannot write data directly to backup tape, it can to other media such as internal or external HDD or NAS that can be programmatically moved to tape. It can also create incremental backups by either of the following:
ExMerge uses a sophisticated process that helps recover all uncorrupted data even if individual mailbox folders contain corrupted messages. All messages in a mailbox folder are extracted collectively to minimize remote procedure call (RPC) traffic and time. On encountering an error, ExMerge automatically skips the message and then begins copying the messages that remain in the folder individually. After reaching the end of the folder, the tool then resumes copying messages collectively again until another error is encountered. This makes it an ideal recovery tool. Another feature of ExMerge is that it is highly scriptable. You can create sophisticated .ini files (either manually or by saving your setting to files as seen in Figure 13.13). You can then script calls to the appropriate file for a variety of backup and disaster recovery operations. Figure 13.13. ExMerge Change Settings Filenames window.
Using Third-Party SolutionsAlthough not specifically necessary, it's possible and common to use third-party backup solutions with SBS and Microsoft Exchange. These vary in price, feature set, and usability from those that are simple wrappers around the NTBackup software to those that fully support the backup APIs and VSS. Third-party backup solutions can provide support for features that the SBS NTBackup does not, such as disk imaging, optical media, brick level backup and restore, and Microsoft Exchange backup via Volume Shadow Copy Services. Additionally, there are vendor and service provider solutions that include offsite backup to remote storage backup via broadband and snapshot or streaming backup to NAS or hot spare servers. In evaluating backup software for SBS and Microsoft Exchange 2003, consider the following:
If you are going to use VSS aware backup software to back up your SBS Exchange databases, you need to turn on the Exchange Writer. You can do this by editing the Registry value located in HKLM\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem and setting the Disable Exchange Writer value to a Value Data of 0. Either toggle the value to 1 or delete the Registry entry when no longer required. Note Be aware that enabling the Exchange Writer inappropriately can cause system errors and data loss. Make sure that the backup solution you are using supports it. Caution The usual warning about editing the Registry applies. Great care needs to be taken. You should have a known good backup of the Registry and know how to restore it in the event of disaster or lockout. |