How Do I Backup My SMS Site Server?

Goto the SMS Home Page

 

Contributed By: Cliff Hobbs [MVP SMS]
One of the BIG FAQS relating to SMS is how do you backup your SMS Site Server?

Well, in order to successfully backup a SMS site, several Registry keys, files, and directories need to be backed up.

Registry Keys - There are two registry keys that need to be backed up:

  • The SMS registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS)
    contains configuration information that is unique to this site such as encryption and decryption keys.
     
  • The NAL registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NAL)
    NAL is the Network Abstraction Layer, which is simply a software layer that shields applications from the network. Applications pass any network requests to the NAL layer which sets up and manages the network connection. It is vital that this registry key is backed up as it contains network connection information for the site such as the CAP list.

Files - The Site Control File is a key file that needs to be backed up. The Site Control File is an ASCII text file that contains the configuration settings for a site. Each time a configuration change is made to the site, the Site Control File is updated to reflect the change.

Directories - The SMS directory needs to be backed up as it contains items used to maintain the site as well as the SMS components themselves. This directory also contains other files such as inventory files, error history files, trace logs, compressed packages, and pending send requests.

Backing up an SMS Server
By default a SMS server isn't backed up. SMS SP1 includes the "
Backup SMS Site Server" task to help automate this process, which is enabled from the "Database Maintenance" window within the MMC. This task is governed by the "SMSBKUP.CTL" file, which is explained below.

SMSBKUP.CTL Explained
The SMSBKUP.CTL file is an ASCII text file that can be edited to customise how an SMS site backup is performed. The file lives in "
SMS\Inboxes\SMSbkup.box" and is broken down into four distinct sections:

  • Tokens
  • Stop
  • Tasks
  • Start

Tokens - This section of the file doesn't normally require any modification. It contains an explanation of the local variables that are already setup by SMS to be used by the SMS back program (SMSBKUP.EXE) to backup the SMS site. For example the "SITE_CODE" variable contains the three character code assigned to the site at the time it was installed.

Stop - As the SMS Site Database is in fact a SQL 7.0 database that permits multi-user access, before the database can be backed up using the SMSBKUP.CTL file, everyone using the database needs to stop using it

This section of the file lists the services that will be stopped in order for the database to be backed up. Lines can be remmed out for any components that aren't installed to prevent errors from being generated.

It is important to note that not all of the SMS services need to be stopped in order for the site database to be backed up (for example the Remote Control service doesn't need to be stopped).

Tasks - This section of the file contains the tasks that actually perform the backup. The backup directory is deleted first to ensure different versions of backups aren't mixed up. Next the SMS directory is backed up.

After the SMS directory is backed up, the "
MACHINFO.BAT" is called, the purpose of which is to report on the configuration of the SMS Site Server being backed up and add it to the backup.

This batch file makes use of the following NT Resource Kit utilities:

  • NLTEST.EXE (although SMSBKUP.CTL mentions it is required, there is no trace of this command actually being used in either batch file)
     
  • NOW.EXE (to capture the current date and time)
     
  • SRVINFO.EXE (is initially run with the "-D" switch to show which services and service drivers are running on the site server. The command is then run a second time with the "-NS" switch)
     
  • TLIST.EXE (the Task List Viewer that displays a list of tasks and processes running on computer).

In addition to the above Resource Kit utilities, this batch file also uses several standard NT commands and the Windows version of Microsoft Diagnostics (WINMSD.EXE which is run with the "/A" switch (to generate a complete system report) and "/F" switch (for the report to be written to a file), to generate the system configuration report.

Once the MACHINFO.BAT file has completed running, various Registry keys are backed up including the SMS and NAL registry keys.

Once again, lines can be remmed out for any components that aren't installed to prevent errors from being generated.

The next part of the batch file relates to running the various SQL commands to check and repair the database for any corruption before it is backed up. This section is often mis-read as meaning if the lines to run the consistency checks are un-remarked, the commands themselves will in fact run BEFORE the SQL database(s) is backed up. The reality is that these lines are merely a recommendation by Microsoft to run these commands separately BEFORE the SMS backup routine is run. These checks can be run automatically from within SMS by enabling the "
Rebuild Indexes" task through the MMC.

The standard SQL databases are then backed up, including the SMS Site database.

The last two lines of this section create two log files for the backup which can be used to check it's status. These two lines rely on logging being enabled for the SMS_SITE_BACKUP task.

Start - This section performs exactly the opposite of the "
Stop" section - it restarts any SMS Services that were stopped in order to facilitate the backup.

Help - The final section of the file provides help with the syntax of the file.
 

© FAQShop.com 2003 - 2008

Goto the SMS Home Page

Email the Author