Export (0) Print
Expand All

Appendix C: The Backup SMS Site Server Task

Published : September 1, 2004

Backing up a site is automated in Microsoft® Systems Management Server (SMS) 2003 by the integrated Backup SMS Site Server task. Use the SMS backup task to regularly back up data such as SMS files, registry keys, and configuration information from your site server, and from your SMS site database server or provider server, if necessary.

caution.gif  Caution
Backing up only one of these data stores (such as the SMS site database) is not sufficient as a backup strategy. You cannot recover a site using a partial site backup, because the site’s data will be out of synch. Also, you cannot use the System Restore feature of the Microsoft® Windows Server™ 2003 operating systems to recover a site, because it does not restore all necessary data.

You can use the Backup SMS Site Server task to back up any site in your hierarchy. However, there are some unique issues associated with backing up the central site and backing up a secondary site.

On This Page

Overview of Backup Control Files
Backup SMS Site Server Task Process
Monitoring Backup
Content of the Backup Snapshot

Overview of Backup Control Files

The Backup SMS Site Server task relies on input to back up your site. It reads the configuration settings that you specified in the backup task properties dialog box. Those configurations include settings, such as when and how often the task runs.

The backup task also reads input from two files, the SMSbkup.ctl, and the AfterBackup.bat files. The first file is used for the backup operation itself and is mandatory; while the second file is used for after-backup operations and is optional. You can edit both files to customize the backup operation to fit your site backup needs.

SMSbkup.ctl backup control file

This file contains site-specific information that the backup task requires. This file contains the names of the files, registry keys, and databases that need to be backed up. It also contains commands that run during the backup operation to gather configuration information. The SMSbkup.ctl file contains tokens that it uses during run time, such as the SITE_BACKUP_DESTINATION token. When the backup task runs and uses the default SMSbkup.ctl file, it backs up all data necessary for recovery. You can customize the SMSbkup.ctl backup control file to address specific backup needs of your site. SMSbkup.ctl is referred to as the backup control file.

AfterBackup.bat batch file

This file allows you to archive the backup snapshot at the end of every backup operation, and to automatically perform other post-backup tasks. By default, the AfterBackup.bat file does not exist and therefore has no effect on the backup operation. You can create the AfterBackup.bat batch file and add commands that run after the SMS backup task has finished.

Backup SMS Site Server Task Process

The SMS_SITE_BACKUP service is the service that runs on the site server to accomplish the backup task operation. The SMS backup task runs under the SMS Service Account or the site computer account. Those accounts must have Read and Write permissions to the folder that you plan to back up the site to.

At its scheduled time, the SMS_SITE_BACKUP service starts a backup cycle. During the backup cycle, the service performs some initial steps, and then backs up data from the site server. It then backs up data from the SMS site database server and from the provider server, if either is set up on a computer other than the site server.

Using the default SMSbkup.ctl file, the backup service performs the following steps during a backup cycle:

  1. The backup service sets the value of the SITE_BACKUP_DESTINATION token, in which it will store the backup snapshot, as follows:

  2. It reads the value of backup destination specified in the Backup SMS Site Server Properties dialog box in the SMS Administrator console.

  3. It uses the value of backup destination as follows: SITE_BACKUP_DESTINATION=backup destination\<site code>Backup
    (this directory structure allows multiple sites to share the same backup destination)

    caution.gif  Caution
    You must ensure that there is sufficient disk space to store a backup snapshot of the site at the backup destination.

  4. The backup service verifies that the following initial requirements are met:

    • That the SMS_SITE_BACKUP service has full control over SITE_BACKUP_DESTINATION, so it can recreate the backup destination folder and copy files to that folder.

    • That the SMS backup control file, SMSbkup.ctl, is valid and has no syntax errors.

    If any of the above requirements is not met, the backup service logs an error message to the backup log file and stops the backup operation.

  5. The backup service creates the SITE_BACKUP_DESTINATION folder.
    If the SITE_BACKUP_DESTINATION folder exists (it typically contains the backup snapshot from the previous site backup), then the backup service does the following:

    • Removes the SITE_BACKUP_DESTINATION folder with its entire content.

    • Recreates the SITE_BACKUP_DESTINATION folder. If the backup destination is on the local server, then SMS configures the SITE_BACKUP_DESTINATION folder with access to the Administrators group. If the backup destination is on a remote system, then the SITE_BACKUP_DESTINATION folder inherits its access rights from the backup destination folder.

  6. The backup service defines all tokens listed in the [Tokens] section in the SMSbkup.ctl file.

  7. The backup service performs all commands that are listed in the [Stop] section in the SMSbkup.ctl file. By default, the backup service stops the following services:

    • SMS_SITE_COMPONENT_MANAGER

    • SMS_EXECUTIVE

    • SMS_SQL_MONITOR

  8. The backup service performs all commands that are listed in the [Tasks] section in the SMSbkup.ctl file. By default, this includes the following:

    • Backing up SMS files.

    • Backing up registry keys.

    • Backing up the SMS site database.

    • Running tools to collect site configuration data, and then backing up that data.

  9. The backup service performs all commands that are listed in the [Start] section in the SMSbkup.ctl file. By default, the backup service restarts the services that were stopped in step 5.

  10. The backup service runs the AfterBackup.bat batch file if both of the following are true:

    • The file exists in the SMS\inboxes\smsbkup.box folder.

    • The backup task was successful.

  11. The backup service attempts to save the backup log file, SMSbkup.log, at the SITE_BACKUP_DESTINATION. It saves the log file if both of the following are true:

    • A log file was created.

    • The SITE_BACKUP_DESTINATION folder was successfully created (even if the task failed at a later point). If this condition is not met, then the backup task preserves the previous backup log file.

Monitoring Backup

The Backup SMS Site Server task logs its activity to the SMSbkup.log file located in the SMS/Logs/ folder.

The task also generates status messages to report its activity and to report various erroneous conditions encountered at run time. (Backup status message numbers are 50xx.) There are three levels of errors reported by the SMS backup task: Critical Errors, Errors, and Warnings. Error conditions affect the backup task, depending on the error level.

Critical errors   Critical Errors cause the backup task to stop. The backup operation is considered failed.

Errors   The backup task continues to run when encountering Error conditions; however, the backup operation is considered failed and the snapshot (if generated) is not valid.

Warning   The backup task continues to run when encountering Warning conditions. A warning by itself does not invalidate the backup snapshot and does not cause any harm to the backup operation. The backup operation is considered successful.

note.gif  Note
If AfterBackup.bat runs as part of the backup operation, it has no effect on the success or failure status of the backup operation.

The backup task logs Critical Errors when encountering problems such as:

  • The backup task is unable to read the registry to obtain site setup information.

  • The backup task is unable to access the site control file, or the backup control file (SMSbkup.ctl).

  • The specified backup snapshot destination is not valid (for example, it points to the SMS installation folder).

  • The backup control file has syntax errors.

The backup task logs Errors when encountering problems such as:

  • The backup task cannot perform a registry backup command (reg) or a database backup command (sitedbdump).

  • The backup task cannot start a service.

The backup task logs Warnings when encountering problems such as:

  • The backup task is unable to connect to the system’s Service Control Manager to verify that a service is installed.

  • A token is being redefined in the SMSbkup.ctl file. In this case, the second definition of the same token is ignored.

  • The backup task cannot perform a file backup command (file).

  • Some of the tools in machineinfo, or some of the commands in smssqlinfo, failed.

If the backup task reports any Critical Errors or Errors, find the cause of the problem, repair it, and rerun the task.

Content of the Backup Snapshot

The SMS backup service stores the site data in files and creates the backup snapshot according to what you specified in the backup control file. The backup snapshot created with the default control file includes SMS files, registry keys, databases, and configuration information.

If the files in the backup snapshot follow the naming convention described in the File Name Conventions section, then you can identify the content of each file in the backup snapshot. This is useful if you need to locate a specific file in the backup snapshot.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft