The Backup SMS Site Server Task

The Backup SMS Site Server Task backs up all the site's data that is required for a site recovery, as a snapshot. The Backup SMS Site Server Task is one of the predefined maintenance tasks. The task is disabled by default. To use the task, you must configure it in the SMS Administrator console and perform some other steps.

When the backup task backs up your site, it relies on input. It reads the configuration settings that you specified in the backup task properties dialog box. These values determine when and how often the task runs. It also reads input from the SMSbkup.ctl control file. Another file that can participate in the backup cycle is the AfterBackup.bat batch file. You can edit these two files to customize the backup operation to fit your site backup needs.

SMSbkup.ctl 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 this file to address specific backup needs of your site. SMSbkup.ctl is referred to as the backup control file.

AfterBackup.bat Allows you to archive the backup snapshot at the end of every backup operation. By default, the AfterBackup.bat file does not exist and therefore has no effect on the backup operation. You can create this file and add commands that run after the SMS backup task has finished.

By default, the Backup SMS Site Server task does not back up the following:

  • Remote Tools, Network Monitor, Package Automation Scripts, or WBEM. These components are not backed up because they are easy to re-install:

  • Note

    • In SMS 2003, software metering data is integrated with the rest of the site's data. There is no need to separately back up software metering data.

  • Custom SMS files, such as custom SMS Administrator console files or custom MOF files, unless they are stored in directories that are being backed up.

  • Any files related to site system roles that are set up on the site server. For example, the files related to a distribution point, or to a client access point (CAP).

On This Page

The Effect of the Backup Task
How the Backup SMS Site Server Task Works
Content of the Backup Snapshot

The Effect of the Backup Task

When the Backup SMS Site Server task runs, it interferes with regular site server activity. To properly back up a site, the Backup SMS Site Server task stops the following basic site services:

  • SMS_SITE_COMPONENT_MANAGER

  • SMS_EXECUTIVE

  • SMS_SQL_MONITOR

Without these services running on the site server, data arriving from clients is not processed. Also, you cannot perform some regular site operations. For example, you cannot:

  • Troubleshoot client computers.

  • Advertise new programs.

  • Distribute new packages.

  • Create new software licenses.

However, you can view reports.

In general, it is recommended that you do not make any site configuration changes or initiate any site activity while the SMS backup task runs. This is because changes are processed only after the backup operation is completed. Any site activity that you initiate is likely to slow down the backup operation.

When the backup operation is completed, the backup task restarts the basic site services that were stopped, and the site server returns to the state that it was in before the task started.

The backup task running on the site server has very little effect on clients. Clients do not interact directly with the site server for most of their activities. They continue to interact with site systems such as client access points and distribution points, which are not affected by the backup operation. However, the site server does not process status messages and inventory data from clients until after the backup operation is completed.

How the Backup SMS Site Server Task Works

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:

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

    • 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

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

  2. 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.

  3. 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.

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

  5. 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

  6. 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.

  7. 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.

  8. 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.

  9. 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.

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 "Using SMSbkup.ctl to Control the Backup SMS Site Server Task" section later in this chapter, 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.

For More Information

Did you find this information useful? Please send your suggestions and comments about the documentation to smsdocs@microsoft.com.

Show: