Preparing for loss of critical data by planning for both backup and recovery operations is a necessity for enterprise solutions such as Microsoft System Center Configuration Manager 2012. For Configuration Manager 2012 sites, this preparation ensures that sites and hierarchies are recovered with the least data loss and in the quickest possible time.
A Configuration Manager 2012 site contains a large amount of data, which is mostly stored in the registry on the site server computer, system files, and the Microsoft SQL Server site database. A Configuration Manager 2012 site operates properly only when the data in all of these data stores is synchronized. During the recovery process, Configuration Manager 2012 automatically synchronizes registry settings and system files to match the site database. To ensure that you are properly backing up your sites, you should schedule the Backup Site Server maintenance task for the central administration site and each primary site in your hierarchy. The Backup Site Server maintenance task creates a complete backup snapshot of your site containing all the data necessary to perform recovery operations. Depending on your Configuration Manager 2012 hierarchy, the need to have a site backup to avoid data loss varies. For example, consider the following scenarios:
- Central administration site with child
primary sites: When you have a Configuration Manager 2012
hierarchy, the site can likely be recovered even when you do not
have a site backup. Because database replication is used in the
hierarchy, the data required for recovery can be retrieved from
another site in the hierarchy. The benefit of restoring a site by
using a backup is that only changes to the data since the last
backup will have to be retrieved from another site, which reduces
the amount of data transferred over your network.
- Standalone primary site: When you have a
standalone primary site (no central administration site), you must
have a backup to avoid data loss.
What’s New in Configuration Manager 2012
The following backup and recovery features are new or have changed in Configuration Manager 2012.
Feature | Description |
---|---|
Recovery integrated with Configuration Manager 2012 Setup |
Configuration Manager 2007 used the Site Repair Wizard to recover sites. In Configuration Manager 2012, recovery is integrated in the Configuration Manager 2012 Setup Wizard. |
Support for multiple recovery options |
You have the following options when running recovery in Configuration Manager 2012:
|
Recovery uses data replication to minimize data loss |
Configuration Manager 2012 database replication uses SQL Server to transfer data and merge changes made to a site’s database with the information stored in the database at other sites in the hierarchy. This enables all sites to share the same information. Recovery in Configuration Manager 2012 leverages database replication to retrieve global data that was created by the failed site before it failed. This process minimizes data loss even when no backup is available. |
Recovery using a Setup script |
You can initiate an unattended site recovery by configuring an unattended installation script and then using the Setup command /script option. |
Backing up Configuration Manager Sites
Backing up Configuration Manager 2012 sites can be automated by scheduling the predefined Backup Site Server maintenance task. You can backup a central administration site and primary site, but there is no backup support for secondary sites or site system servers. When the Configuration Manager 2012 backup service runs, it follows the instructions defined in the backup control file (.\Inboxes\smsbkup.box\smsbkup.ctl). You can modify the backup control file to change the behavior of the backup service. Site backup status information is written to the smsbkup.log file. This file is created in the backup files destination directory specified in the Backup ConfigMgr Site Server maintenance task properties when the backup task runs.
Use the following procedure to enable the site backup maintenance task for a site.
To enable the site backup maintenance task
-
In the Configuration Manager console, click Administration.
-
In the Administration workspace, expand Site Operations, and then click Sites.
-
Select the site in which to enable the site backup maintenance task.
-
On the Home tab, in the Settings group, click Site Maintenance Tasks.
-
Click Backup Site Server and then click Edit.
-
Select Enable this task, specify the backup destination, and then configure an appropriate schedule for the site backup task.
-
Click OK and then click OK.
Verify that the Backup Site Server maintenance task is running successfully after you schedule it to ensure that you are prepared to recover the site if it fails, and also to help plan for disaster recovery. To do so, ensure that the time stamps on the files in the backup destination folder created by the Backup Site Server maintenance task match the last time that the maintenance task was scheduled to run. If the time stamps on the files in the backup destination folder do not match the last time that the Backup Site Server maintenance task was scheduled to run, review the SMS_SITE_BACKUP component for warnings and errors.
Archiving the Backup Snapshot
The first time the Backup Site Server maintenance task runs, it produces a backup snapshot, which you can use to recover your system in the event of a failure. When the backup task runs again during subsequent cycles, it creates a new backup snapshot that overwrites the previous snapshot. As a result, the site has only a single backup snapshot. Using this method prevents you from retrieving earlier backup snapshots.
It is recommended that you archive the backup snapshot. As a best practice, there should be multiple archives of backup snapshots for the following reasons:
- It is common for backup media to fail, get
misplaced, or have only a partial backup stored on it. Recovering a
failed site from an older backup is better than recovering with no
backup at all.
- A corruption in the site can go undetected
for several backup cycles. You may need to go back several cycles
and use the backup snapshot from before the site became
corrupted.
- The site might have no backup snapshot at all
if, for example, the Backup Site Server maintenance task fails.
Because the backup task removes the previous backup snapshot before
it starts to back up the current data, there will not be a valid
backup snapshot.
Using the AfterBackup.bat File
After successfully backing up the site, the Backup Site Server task automatically attempts to run a file named AfterBackup.bat. The AfterBackup.bat file is not installed during site installation and must be created manually by the administrator. If an AfterBackup.bat file exists, and is stored in the correct directory, the file will automatically run after the backup task has completed. The AfterBackup.bat file allows you to archive the backup snapshot at the end of every backup operation, and automatically perform other post-backup tasks if desired. The AfterBackup.bat file integrates the archive and the backup operations, thus ensuring that every new backup snapshot is archived. If an AfterBackup.bat file does not exist it has no effect on the backup operation, but in order to archive the backup snapshot, another method must be used.
Although the intended use of the AfterBackup.bat is to archive backup snapshots, you can create an AfterBackup.bat file to perform additional tasks at the end of every backup operation, such as:
- Run a SQL Server DBCC test to verify that
there are no integrity problems with the site database.
- Run a site health tool or other health
tools.
Site Recovery
A Configuration Manager 2012 site recovery is required whenever a Configuration Manager 2012 site is installed with a site code or site server name that was previously used in the hierarchy. Repairing and re-synchronizing data are the core tasks of a site recovery, and are required to prevent interruption of operations and corruption of data. Site recovery is initiated in the Configuration Manager 2012 Setup Wizard or by configuring the unattended installation script and then using the Setup command /script option.
Use one of the following procedures to initiate the site recovery process.
To initiate a site recovery
-
Run the Configuration Manager 2012 Setup Wizard from <ConfigMgr 2012 Installation Source Path>\SMSSETUP\BIN\X64\setup.exe.
-
From the Getting Started page, select Recover a site server, and then click Next.
-
Complete the wizard using the options that are appropriate for your site recovery.
To initiate an unattended site recovery
-
Prepare the unattended installation script for the recovery options that you need for the site.
-
Run Configuration Manager 2012 Setup using the command /script option. For example, if you named your setup initialization file ConfigMgrUnattend.ini and saved it in the C:\temp directory of the computer you are running setup on, the command would be: Setup /script C:\temp\ConfigMgrUnattend.ini.