Backing Up the Site Through Systems Management Server

[Previous] [Next]

As mentioned, the SMS Administrator Console provides backup tasks among its database maintenance tasks. These backup tasks fall into two categories: backing up the site database (or the software metering database) and backing up the site server. Let's look at both options in this section.

Backing Up the Site Database

The site database backup consists of two parts: the backup of the database transaction log using the Export Site Database Transaction Log task and the backup of the database itself using the Export Site Database task.

The transaction log maintains an audit of database transactions that have taken place to aid in recovery of the database in the event of failure. Because the transaction log contains this audit trail of activity, it is sometimes used by SQL Server administrators as an alternative to performing frequent full database backups. They can perform a full backup once a week, say, and back up the transaction log on a daily basis. In the event the database needs to be recovered, it is an easy matter to restore the database and the appropriate transaction logs.

Before you back up the transaction log, you must turn off the Truncate Log On Checkpoint option in SQL Server Enterprise Manager. The Truncate Log On Checkpoint option is set through the Properties window for the database (SQL Server 7.0) or for the transaction log device (SQL Server 6.5) and is accessible through the SQL Server Enterprise Manager. By default, this option is enabled and causes the transaction log to be frequently flushed to keep it from growing too large too quickly. If you leave this option enabled, backing up the transaction log does not produce any added benefit, as it will most likely contain few, if any, recent transactions.

NOTE
As the database transaction log backup is currently configured, it doesn't provide much useful information. It is up to you, the administrator, to consider the SQL Server backup procedures you may already have in place for other databases. If you already backup the transaction logs for your current databases, you may choose to turn off Truncate Log on Checkpoint and back up the site database transaction logs as well. It is not necessary, however, to back up the site database transaction log in order to have a complete backup of the site.

If you turn off the Truncate Log On Checkpoint option, you must then build into your daily or weekly task list a disk space check of the transaction log to ensure that it does not run out of space or, as in the case of SQL Server 7.0 autosizing, consume too much disk space.

MORE INFO
Please refer to your SQL Server documentation for detailed information regarding how to modify database options, create backup devices, and configure backup and restore options through the SQL Server Enterprise Manager.

The Export Site Database maintenance task exports the site database to a pre-defined backup device or file. Thus, before you can enable this task, you must have created a backup device through the SQL Server Enterprise Manager. To create a backup device using SQL Server 7.0, follow these steps:

  1. In the SQL Server Enterprise Manager, expand the server entry, navigate to the Management folder, expand it, and select Backup, as shown in Figure 17-4.
  2. click to view at full size.

    Figure 17-4. The SQL Server Enterprise Manager window.

  3. Right-click on Backup, and choose New Backup Device from the context menu to display the Backup Device Properties window, shown in Figure 17-5.
  4. Enter the name of the backup device you want to create—for example, SMSxxx, where xxx represents the site code of your SMS site.
  5. Specify whether your backup device resides on tape or as a file. If you have installed a tape device on your server, you will be able to select it from the drop-down list for the Tape Drive Name option. Otherwise this option will be unavailable. If your backup device resides as a file, a filename will be created for you, or you can specify where to create the device.
  6. Figure 17-5. The Backup Device Properties window.

  7. Click OK to create the device. Your new device will now appear in the Details pane of the SQL Server Enterprise Manager window when you select Backup.

Once the backup device has been created, you can enable the Export Site Database task through the SMS Administrator Console. To do so, follow these steps:

  1. In the SMS Administrator Console, navigate to the Database Maintenance folder under Site Settings, expand it, and select the Tasks folder.
  2. Right-click on Export Site Database, and choose Properties to display the Export Site Database Task Properties window, shown in Figure 17-6.
  3. Figure 17-6. The Export Site Database Task Properties window.

  4. Select the Enable This Task check box. Enter the name of the backup device, including any paths, in the Export To text box, and specify a schedule for the backup.
  5. Click OK to save your configuration.

At the scheduled time, SMS will perform the site database backup task. Until the backup has occurred, the backup device file you created will not be displayed in the actual folder. You can view the contents of the backup device using Enterprise Manager by double-clicking on the device to display the Backup Device Properties window, shown in Figure 17-5. Click on the View Contents button to display the View Backup Media Contents dialog box, shown in Figure 17-7. This dialog box displays details about the backup, including when the backup took place, the type of backup that was performed, the database name, and its size at the time of backup.

click to view at full size.

Figure 17-7. The View Backup Media Contents dialog box.

Repeat this procedure to enable the backup maintenance tasks for the site database transaction log if you have disabled the Truncate Log On Checkpoint option and for the software metering database and transaction logs if you have installed that feature.

Backing Up the Site Server

A far more comprehensive backup routine is contained in the Backup SMS Site Server maintenance task. This maintenance task essentially performs all the required backups outlined earlier in this chapter in the section "Backup Process Flow," plus backs up some additional information including the SMS directory structure and files, the SMS-related Windows NT registry keys and values, and the site control file.

This task was available in SMS 2.0 prior to SMS 2.0 Service Pack 1, but Service Pack 1 has added some significant enhancements to its performance. To facilitate the processing of this task, SMS 2.0 Service Pack 1 installs and loads a new SMS service named SMS Site Backup. Like other SMS service components, this service comes with a log file (Smsbkup.log) that you can enable through SMS Service Manager (see Chapter 3). Unlike the other log files, which are best used for troubleshooting tasks, the SMS Site Backup log should be enabled because it maintains a record of what you ran for site backup. When you restore a site, you can use the log to verify that you are restoring from a valid backup. Like other logs, as this log reaches its maximum size (1 MB by default), it is written to Smsbkup.lo_, and a new Smsbkup.log file is created. For a complete backup history, and for redundancy, back up these two files as well. Figure 17-8 shows an example Smsbkup.log file created after the Backup SMS Site Server task is run. Notice that the task first stops SMS components and services before beginning its copy process.

click to view at full size.

Figure 17-8. Sample Smsbkup.log file.

It's not necessary to have predefined a backup device when you enable the Backup SMS Site Server task. You must, however, provide the name of a backup folder location where the SMS Site Backup service will write the backed up data. This location can actually serve as the main backup location for several site servers because when the task is run, the SMS Site Backup service creates a subdirectory named by the site code, and all backup data is written there.

It should be of no little significance then that the location of the backup folder must be on a partition with adequate disk space to accommodate the data being written there. Microsoft recommends at least 2 GB of available space. However, a more accurate accounting of the space required can be determined by considering the following factors:

  • Amount of disk space used by the entire SMS directory structure
  • Amount of space used by the following SQL Server databases: master, MSDB, site server, and software metering server
  • At least 10 MB additional space for miscellaneous files such as saved registry keys

At each subsequent scheduled backup, the SMS Site Backup service will first remove the old backed up data before writing the new data. It will also record each backup event in the Smsbkup.log file, viewable using the SMS Trace utility.

NOTE
If you enabled the Backup SMS Site Server task prior to installing SMS 2.0 Service Pack 1, you should remove the old backup files before enabling the task under Service Pack 1, as the task will not overwrite old backup files.

The Backup Control File

The entire Backup SMS Site Server task is actually governed by a backup control file named Smsbkup.ctl, contained in the SMS\Inboxes\SMSbkup.box folder. This file outlines exactly what will be backed up and where. Smsbkup.ctl is a text file, and as such it is fully customizable. It is also well annotated, which will assist you in reading and understanding its flow, as well as in customizing it.

The backup control file is based on the Express Setup option for SMS—that is, it assumes that all default components have been installed. If you selected specific components and chose not to install others during a Custom setup, the backup control file will try to stop and start SMS services and components that have not been installed, resulting in the recording of superfluous errors. These errors will not affect the actual backup process; however, to avoid recording them you should consider modifying the backup control file so that it deals only with those components you did install. Be sure to edit the file again if you decide to add SMS components in the future.

Appendix A presents the code for the backup control file for your reference. Refer also to the Microsoft Systems Management Server Version 2.0 Service Pack 1 Release Notes for additional information regarding the use and customization of this file.

Configuring Backup SMS Site Server

To configure the Backup SMS Site Server maintenance task, follow these steps:

  1. In the SMS Administrator Console, navigate to the Database Maintenance folder under Site Settings and expand it.
  2. Select the Tasks folder, select Backup SMS Site Server, right-click on it, and choose Properties to display the Backup SMS Site Server Task Properties window, shown in Figure 17-9.
  3. Figure 17-9. The Backup SMS Site Server Task Properties window.

  4. Select the Enable This Task check box.
  5. In the Export To text box, enter the name of the drive and directory where you have already created a backup folder or where you want SMS to create the folder for you. This name cannot contain any extended ASCII characters.
  6. Specify a schedule for the backup. For active databases, a daily backup is recommended.
  7. Click OK to save your configuration and enable the backup.

At the scheduled time, the SMS Site Backup service will find or create the backup destination folders, stop appropriate SMS site server services, and perform the backup. After the backup is complete, you can view the contents of the backup folder through the Windows Explorer. Figure 17-10 shows the contents of a sample backup folder.

click to view at full size.

Figure 17-10. Sample backup folder contents.

Notice that the SMS Site Backup service created a subdirectory named with the site code. Within this directory are directories containing information relating to the software metering and site database servers (MeteringDBServer and SiteDBServer), the SMS Provider server (ProviderServer), and the SMS site server (SiteServer), which itself contains the entire site directory structure and also the WBEM directory entries. Notice too that the SiteServer folder contains two server configuration data files, the result of running Srvinfo.exe and Winmsd.exe, and many more registry keys than the recommended SMS and NAL registry backups (SMSbkSiteRegSMS.dat and SMSbkSiteRegNAL.dat). In fact, the following registry keys are backed up from the Windows NT Registry on the SMS site server:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\MMC
  • HKEY_LOCAL_MACHINE\Software\Microsoft\NAL
  • HKEY_LOCAL_MACHINE\Software\Microsoft\NetworkMonitor
  • HKEY_LOCAL_MACHINE\Software\Microsoft\SMS
  • HKEY_LOCAL_MACHINE\Software\Microsoft\SNMPEvents
  • HKEY_LOCAL_MACHINE\Software\Microsoft\WBEM
  • HKEY_LOCAL_MACHINE\Software\Microsoft\Seagate Software\Crystal Info
  • HKEY_LOCAL_MACHINE\Software\Microsoft\Seagate Software\Crystal MMC SnapIn
  • HKEY_LOCAL_MACHINE\Software\Microsoft\Seagate Software\Seagate Crystal Info for SMS

The SiteDBServer directory, shown in Figure 17-11, contains configuration information about the Windows NT server on which SQL Server is installed and about the SQL Server installation in particular. If SQL Server is installed on the same server as SMS, the Windows NT server configuration is the same as that written to the SiteServer directory.

click to view at full size.

Figure 17-11. The SiteDBServer directory.

Notice that this directory contains duplicate backups of the main SQL Server database files, as follows:

  • Master (SMSbkSQLDBmaster.dat)
  • Model (SMSbkSQLDBmodel.dat)
  • MSDB (SMSbkSQLDBmsdb.dat)
  • SMS site database (SMSbkSQLDBsite.dat)

It also contains the HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer registry key (SMSbkSQLRegMSSQLServer.dat) and copies of the NAL, SMS, SNMPEvents, and WBEM keys on the SQL server. If SQL Server is installed on the same server as SMS, these last four keys are the same as those written to the SiteServer directory.

The registry value saved under ProviderServer is a redundant copy of the HKEY_LOCAL_MACHINE\Software\Microsoft\SMS key written to either the SiteDBServer or the SiteServer folder, depending on whether the SQL server or the SMS site server was installed with the SMS Provider. Typically, the SMS Provider is installed on the SQL server if the SQL server is a different Windows NT server from the SMS site server.

As you can see, this backup routine is quite comprehensive, and should be more than adequate to act as your SMS backup routine.

TIP
You can change the scheduled time for the Backup SMS Site Server task to whenever you want, but the SMS Site Backup service is engineered to check the schedule only once per day. If you need to execute this maintenance task immediately, configure the task and then stop and start the SMS Site Backup service by running the Services applet in the Control Panel on the site server.

REAL WORLD  Connection Accounts and Backup

As we saw in Chapter 16, the SMS Client Connection account is used by SMS client components running on Windows NT clients to connect to client access points (CAPs) and distribution points to transfer data such as inventory or client configuration updates. SMS creates one such account for the Windows NT domain named SMSClient_sitecode, with a random password that is propagated to each Windows NT client. This is an internal account that should not be manually modified in any way.

When a site is restored from a backup, the password for the default SMS Client Connection account is reset. If you have not created any client connection accounts in addition to the default, the SMS clients will effectively be unable to connect to a CAP or distribution point because the password recognized by the client will be different from that reassigned as a result of the restore process. The change in password is copied to all site CAPs so that the clients can be updated. Ironically, since the client will be unable to connect to the CAP in the first place, it will not be able to update itself with the new SMS Client Connection account password. There is no way to set the password back to the original, because there is no way of knowing what the original password was.

If you have additional client connection accounts specified for the Windows NT clients and they cannot connect using one account, they will try using the others. You control the passwords for the manually created client connection accounts. The site backup and restore scenario is a perfect example of why you should consider creating at least one additional client connection account for your site (preferably before you back up the site).



Microsoft Systems Management Server 2.0 Administrator's Companion
Microsoft Systems Management Server 2.0 Administrators Companion (IT-Administrators Companion)
ISBN: 0735608342
EAN: 2147483647
Year: 1999
Pages: 167

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net