How to Backup SCCM Server: A Complete Guide

This article demonstrates the steps to backup SCCM server. In the event of a disaster, a Configuration Manager site can be fully recovered using a backup of the databases.

Any organization using SCCM to manage devices must prepare backup and recovery approaches to avoid data loss. Backing up a Configuration Manager site is critical because it avoids the loss of critical data.

The ConfigMgr site database is a SQL Server database that contains data about your ConfigMgr infrastructure and objects, the client systems you manage, and other discovered resources. You will not be able to use any ConfigMgr resources if the database is damaged or corrupted. Hence, it is important to back up the Configuration Manager site database.

The SCCM backup and restore process is different from the Windows Server backup. The Configuration Manager provides a backup maintenance task that runs on a schedule and backs up the site database, specific registry keys, and specific folders and files. You can also create the AfterBackup.bat file to perform post-backup actions automatically after the backup maintenance task runs successfully.

Considerations before you back up a Configuration Manager site

Listed below are some considerations before creating a backup of the SCCM site data:

  1. The SMS Writer service must be running for the Configuration Manager site backup to successfully complete. The SMS Writer service must run under the Local System account.
  2. Configuration Manager can recover the site database from the backup task. It can also use a backup of the site database that you create with another process.
  3. The SMS_SITE_VSS_WRITER service (smswriter.exe) must be running to perform a successful backup.
  4. Backups can only be performed from the SCCM Central and Primary Site servers. Secondary sites cannot be backed up. If a secondary site fails, you’ll have to set up a secondary site in SCCM.
  5. You can automate backup for Configuration Manager sites by scheduling the predefined Backup Site Server maintenance task.
  6. The Local System account on the site server must have Write NTFS file system permissions to the local folder for the site server backup. The Local System account on the computer that is running SQL Server must have Write NTFS permissions to the folder for the site database backup.
  7. You can use System Center Data Protection Manager (DPM) to back up your Configuration Manager site database. If you are not licensed for DPM, you can backup the database using the built-in backup maintenance task.

Also Read: Fix ConfigMgr Database Suspect Mode Issue

Ways to back up ConfigMgr Site Database

There are two ways to back up the site data and database files of a ConfigMgr site:

  1. Configure site backup maintenance task to automatically back up the ConfigMgr database
  2. Manually back up a Configuration Manager site

In this article, we will go over both of the methods mentioned above.

How often should you run the Site Backup Task?

You must configure an appropriate schedule for the site backup maintenance task. Microsoft recommends running the default site backup task at a minimum of every five days. This schedule is appropriate because Configuration Manager uses a SQL Server change tracking retention period of five days. As a best practice, consider a backup schedule that is outside of active working hours.

Most organizations prefer to back up a Configuration Manager site over the weekends. This is because there are not many employers who work on weekends, and no application or update deployments take place during this time. Weekends are also good for troubleshooting database problems and backup errors.

Also Read: Change SQL Database Recovery Model – 2 Easy Methods

Which service is responsible for SCCM backup?

The SMS Writer service must be running for the Configuration Manager site backup to successfully complete. The SMS Writer service must run under the Local System account.

In some cases, the SCCM backup fails with the error “The SMS writer service either does not exist or is not running.” To resolve this error, ensure that no security software, such as a firewall or antivirus, is preventing the SMS writer service from running. In addition, review the smsbkup.log for SCCM backup errors. Take a look at all the log files related to the SCCM backup.

What data is backed up?

When you run the site server backup maintenance task or manually initiate a site backup, the following data is backed up:

  1. Configuration Manager site database.
  2. Master site control file (.InboxesSitectrl.boxSitectrl.ct0).
  3. SMS and NAL registry keys on the site server.
  4. Configuration Manager installation directory on the site server.
  5. CD.latest

What data does not get backed up?

When you back up the SCCM database, the following things are not backed up:

  1. This backup does not contain any of the programs, packages, OS images, or other data sources; all of these should be backed up individually.
  2. The backup maintenance task does not include a backup for the content library or the package source files. When a site server fails, the information about the content library files is restored to the site database, but you must restore the content library and package source files on the site server.
  3. Custom SCCM reports are not backed up. Ensure you copy the custom reports to a different folder. It is essential to create a backup of the report server database files if you have customized or altered pre-made Reporting Services reports, as these are not backed up during backup tasks.
  4. Backups of additional databases, like the SCUP database, must be made independently.
  5. The maintenance task for site server backup does not include backing up the user state migration data. As part of your backup plan, you must manually back up the folders that you specify to store the user state migration data.

When can I use option Recover the site database using a backup set ?

You can use Recover the site database using a backup set option when you have a backup of the Configuration Manager site database that was created as part of the Backup Site Server maintenance task run on the site before the site database failure.

Steps to Backup the SCCM Server

Backing up the database of an SCCM site requires multiple steps. We will go through each step in detail and show you how to enable and configure the site backup maintenance task.

Step 1: Launch the Site Maintenance

Follow these instructions to start site maintenance on a primary site:

  • In the Configuration Manager console, go to Administration > Site Configuration > Sites.
  • Right-click the primary site and select the option Site Maintenance.
Launch the Site Maintenance - Backup SCCM Server
Launch the Site Maintenance – Backup SCCM Server

Step 2: Enable Backup Site Server Maintenance Task

You can automate backup for Configuration Manager sites by scheduling the predefined Backup Site Server maintenance task. You will have to manually enable this maintenance task on a primary site. On the Site Maintenance window, right-click the “Backup Site Server” task and select Edit.

Enable Backup Site Server Maintenance Task
Enable Backup Site Server Maintenance Task

On the Backup Site Server Properties window, select Enable this task.

Enable Backup Site Server Maintenance Task
Enable Backup Site Server Maintenance Task

Step 3: Configure Backup destination

In this step, we will configure the backup destination to store the site data backup and the site database backup. Before you specify the location for SCCM backup, ensure that the site server machine account has full control of the destination folder.

On the backup site server properties window, select Set Paths. Here, you can select one of the two options to store the database backup.

  1. Local drive on site server for site data and database: Specify the backup files for the site and site database in the specified path on the local disk drive of the site server.
  2. Network path (UNC name) for site data and database: Configure the backup location for site data and the database on a network path.

Out of the two backup destinations, we do not recommend using a local drive as the backup location for the data. The ConfigMgr site and the backup would be lost if the system hosting the site server failed. Hence, use the network path option to store the site data and the database.

Click Apply and OK to save the changes.

Configure Backup destination
Configure Backup destination

Once you have configured the backup destination, the configured backup destination is visible on the backup site server properties window, as shown in the below screenshot.

Configure Backup destination
Configure Backup destination

Step 4: Configure the Schedule for SCCM Backup

After enabling the SCCM backup task and configuring the backup destination, the next step is to configure the schedule. The backup schedule defines how often the Backup Site Server maintenance task runs.

Configure the backup schedule (days of the week, start time, and latest start time). In the screenshot below, the following schedule is configured for the SCCM backup.

  • Start after: 6:00 AM
  • Latest Start time: 11:00 AM

Choose “Enable alerts for backup task failures“. These failure alerts are available in the Alerts node of the Monitoring workspace. Click Apply and OK.

Configure the Schedule for SCCM Backup
Configure the Schedule for SCCM Backup

After making the above changes, the backup site server maintenance task shows as enabled. Once you have configured the backup task, it runs on the specified schedule and backups the site database to the specified location. This is how you automatically configure backup for SCCM.

How To Backup SCCM 2012 R2 Server

Step 5: Verify that the Backup Site Server maintenance task is running

Manually back up a Configuration Manager Site

If you don’t want to automatically back up the Configuration Manager site database, you have the option to manually back up the database when required.

If you want to backup the SCCM server immediately, you can use the manual backup method. As a SCCM backup best practice, we recommend you perform the manual backup when the site database is least utilized. Depending on the size of the ConfigMgr database, the backup may take a long time to complete.

There are two ways of manually backing up the Configuration Manager site:

  1. Start the SMS_SITE_BACKUP service
  2. Manually start SMS_SITE_BACKUP component using Configuration Manager Service Manager

Both of these methods do the same thing: they trigger the site backup immediately. Let’s look at each of these methods in detail.

Method 1: Start the SMS_SITE_BACKUP service

Perform the following steps to manually back up a Configuration Manager site: On the SCCM server, launch the Services console. Search for the service named “SMS_SITE_BACKUP” and start this service. The smsbkup.exe is located in the “C:\Program Files\Microsoft Configuration Manager\bin\x64\” folder.

Manually back up a Configuration Manager Site
Manually back up a Configuration Manager Site

When the backup maintenance task fails, restart the backup task by stopping and restarting the SMS_SITE_BACKUP Windows service.

Method 2: Run SMS_SITE_BACKUP from Service Manager

You can use the following steps to start the SMS_SITE_BACKUP component using the Configuration Manager service manager:

  • Navigate to Monitoring > System Status > Component Status.
  • Right-click any component and then select Start > Configuration Manager Service Manager.
  • In the Configuration Manager Service Manager, expand your site code and choose Components.
  • Right-click the SMS_SITE_BACKUP component and select Query. The component displays as stopped.
  • Right-click the SMS_SITE_BACKUP component and select Start. This action starts the backup task.
Run SMS_SITE_BACKUP from Service Manager
Run SMS_SITE_BACKUP from Service Manager

Monitor SCCM backup

The above actions trigger the backup task on the primary site server. While the SMS Backup task runs, you can monitor the backup task by reviewing the smsbkup.log. This file is located in the C:\Program Files\Microsoft Configuration Manager\Logs folder. Any backup failures or warnings are logged in smsbkup.log.

smsbkup.log Monitor SCCM backup
smsbkup.log Monitor SCCM backup

After a few seconds, we see that the backup has been successfully completed. The following lines logged in the smsbkup.log confirm the successful completion of the site backup task. After the backup task is completed, the SMS_SITE_BACKUP service is stopped automatically.

Info: Starting asynchronous BackupComplete...	SMS_SITE_BACKUP
Info: Asynchronous BackupComplete finished.	SMS_SITE_BACKUP
Backup completed - Wed Nov 15 23:59:13 2023	SMS_SITE_BACKUP
Created the backup ini file successfully.	SMS_SITE_BACKUP
SMS_SITE_BACKUP service is stopping.
smsbkup.log Monitor SCCM backup
smsbkup.log Monitor SCCM backup

Let’s open the SCCM backup folder and see what data has been backed up. The SCCM backup creates a folder called <SiteCodeBackup> at the destination location. This folder contains the following subfolders and files:

  • CD.Latest: In this folder, you’ll find the Configuration Manager source installation files for the currently installed version.
  • SiteDBServer: ConfigMgr database and log files (CM_SITECODE.mdf and CM_SITECODE_Log.ldf).
  • SiteServer: This folder contains SMSbkSiteRegSMS.dat. It also contains two subfolders: SMSServer and AdminUIContentStaging.
  • BackupDocument.xml
  • ConfigMgrbackup.ini
  • smsbkup.log
Backed-Up Files (ConfigMgr Maintenance Task)
Backed-Up Files (ConfigMgr Maintenance Task)


  1. Avatar photo Antoine Oxyan says:

    Hello Prajwal,
    Could you please tell me if it is also possible to create a maintenance plan in the Microsoft SQL Server Management Studio to backup and optimize all the databases ?
    Thank you in advance for your reply.
    Best regards

  2. Thanks for this instructions.

  3. Avatar photo Tom Paget says:


    You are an absolute life saver! I love your blogs. They are spot on accuracy! The same steps apply to a MECM Server running Server 2019 with

    1. Avatar photo SALIM SAID says:

      I concur with you I fell in love with this guy from day one!!!

  4. These mdf & ldf files are growing in size. Any solution

  5. Avatar photo Yogesh Gupta says:

    Hi Prajwal
    I am having an infra with cas and one primary site in my testing enviroment.
    My query is that If I run backup on cas will it also backup he child primary site.

  6. Avatar photo Insaf Muhammed says:

    Awesome brother, can’t thank you enough for these lemons 🙂

    1. Avatar photo Raheel Ali says:

      Insaaf…. is that u 🙂

  7. Avatar photo Felipe Bautista says:

    Hi, enable backup site in network path, but it does not allow change for local path

  8. I completed a SCCM restore to another server. Same name, drive letters etc. I am at the point where I am redistributing the content to another DP and it is failing. I see the following errors.

    [10EC][Fri 12/30/2016 13:23:30]:Failed to validate IIS and ShareFolder configurations. Return code: 0x80070002
    [10EC][Fri 12/30/2016 13:23:30]:RegQueryValueExW failed for SoftwareMicrosoftSMSDP, ContentLibUsableDrives
    [10EC][Fri 12/30/2016 13:23:30]:RegReadString failed; 0x80070002
    [10EC][Fri 12/30/2016 13:23:30]:Failed to GetDPUsableDrives. error = 0x80070002

    I also see.
    AlgID property is not valid

    Any help would be appreciated.

  9. How would I backup all my source content?

  10. Avatar photo Craig Brown says:

    Hi There,

    I have DPM 2012 R2 and SCCM 2012 SP1 CU3. I have the DPM agent on both my DB server and my SCCM server . In DPM I don’t see the SMS Writer service in my data source list.

    Also, up until reading this article I have just been using a standard SQL server DB backup for my SCCM database using DPM, will this not be enough for a disaster recovery?


  11. The first time the Backup Site Server maintenance task runs, it creates a backup snapshot, which you can use to recover your site server in case 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, and you have no way of retrieving an earlier backup snapshot.

  12. Avatar photo Stephen Nowowiejski says:


    First of all, thank you for the excellent instructions. I have a question though.

    I was able to get the backup feature working and it has done two successful backups. However, it’s does not appear to be overwriting the database files under the “SiteDBServer” folder. It’s still the files dated from the very first backup a week ago

    My log says that is registers the connection to the DB. Also that “SQL Backup task completed successfully.”
    One line I notice in your screen shot but not mine is “After BackupComplete SQL Writer status = STABLE.”
    Is it supposed to overwrite the DB files with every backup? My fear is that even though the logs state the backup was successful, that I’ll still lose a “weeks worth of data”.
    Thank you.

  13. Hi Prajwal

    I have a question about reinstalling IIS on SCCM 2012R2. The server has 10 roles (including the Management Point, App Catalog Web Service Point, App Catalog Website Point Services, Reporting Point, Fallback Status Point,). I have a problem such as in this thread:
    I decided to reinstall IIS. Do you first have to remove all dependent on the IIS roles?

    1. Hi Tom, you need to be little careful while reinstalling the IIS on primary site.

  14. Avatar photo amar baghel says:

    Hi Prajwal your docx so helpful now i become regular folower of ur blogs

  15. Will it be possible to write a task sequence on how to upgrade BIOS for DELL hardware and deploy packaged applications to AD groups within the task sequence??? Just a request. Your deployment articles are detailed with screen shot – thought a new article on the above might help a lot of people including me….

    1. Yes you can do that using a task sequence. Before I post the article I have to try it out once in my lab setup..

      1. Avatar photo Raja Munibalan says:

        Dear prajwal , I m salute you ,This kind prief explanation even i didn’t see ENG book also thanks for giving and spend your valuable time for us
        Can i have why we are going to sccm ,can’t use AD GP software push ,wds and i need a interview question , kindly i requst you to send me

        Thanks in advance

  16. Followed your instruction and completed the backup. Thanks!!!

Leave a Reply

Your email address will not be published. Required fields are marked *