Backing up ConfigMgr

Backing Up ConfigMgr

Everyone knows about the backup maintenance task for ConfigMgr. You configure that, and you’re good to go if your site ever fails. What you may not realize is that you actually need a little bit more than that if you don’t want to recreate your applications and packages and have to redistribute everything to your distribution points. Also, in case you’ve never looked, the backup maintenance task only keeps the most previous backup. If you want to keep multiple, you will have to do some scripting.

I will go over the other folders that you need to backup, how to retain multiple days’ worth of backups, and finally provide a PowerShell script that you can use to automatically do all of this for you.

Additional Folders

There are at least five additional folders that you need to backup. The reason I say “at least” is because the number will depend on how many distribution points you have in your environment. The following folders will exist on any central administration server (CAS) or primary site server (PSS) that you have.

SCCMContentLib

SMSPKG

SMSPKGSIG

SMSPKG<drive letter>$

Additionally, you will need to backup the SMSSIG<drive letter>$ folder on each distribution point. This folder can be accessed by going to \\<server name>\SMSSIG$, which is the best way to access the share for backup. If you have a bunch of distribution points, this folder is not critical to backup. You will still be able to redeploy your distribution points from your reinstalled site. It will just increase the time it takes, because you will have to delete them from the system and add them back. If you have a bunch of applications or packages, this process can take a lot of time, so be careful and really consider whether it’s worth the extra time to script it and disk space to house the backups.

In both the SMSPKG<drive letter>$ and SMSSIG<drive letter>$, the <drive letter> is the drive letter where the folder exists.

PowerShell Script

As I said at the beginning, attached to this post is a PowerShell script to do the backup for you. You will need to change a few things. First, in line 2, change the directory where you want your backups stored. The script places the backups in folders for the date. For example, if my backups went to \\server01\backups\sccm, then 20160329, 20160330, and 20160331 would be subfolders containing the database backup created by the maintenance task, and the folders listed above. The \\server01\backups\sccm location is what I would enter in line 2:

4

This step creates a PowerShell drive for this location, which is much easier to reference later in the script.

Next, on line 5, change this to the directory where the ConfigMgr maintenance task saves it’s backup. The script actually copies that backup, which includes the database, to our new backup directory that also contains the content backups. The script grabs everything contained in this directory.

5

Finally, in line 8, set the number of days that you want to retain the complete backup. I recommend 7 days, but it’s up to you.

Share:

Facebook
Twitter
LinkedIn

Contact Us

On Key

More Posts

Mastering Azure AD Connect - A Comprehensive Guide by WME
Active Directory

Mastering Azure AD Connect – A Comprehensive Guide

Modern businesses are fast moving toward cloud-based infrastructure. In fact, cloud-based business is not just a trend anymore but a strategic necessity. Microsoft’s Azure Active Directory (Azure AD) has become a frontrunner in this domain. It

Read More »
Security Best Practices in SharePoint
Office 365

Security Best Practices in SharePoint

Microsoft SharePoint is an online collaboration platform that integrates with Microsoft Office. You can use it to store, organize, share, and access information online. SharePoint enables collaboration and content management and ultimately allows your teams to

Read More »
The Ultimate Guide to Microsoft Intune - Article by WME
Active Directory

The Ultimate Guide to Microsoft Intune

The corporate world is evolving fast. And with that, mobile devices are spreading everywhere. As we venture into the year 2024, they have already claimed a substantial 55% share of the total corporate device ecosystem. You

Read More »
Protecting Microsoft 365 from on-Premises Attacks
Cloud Security

How to Protect Microsoft 365 from On-Premises Attacks?

Microsoft 365 is diverse enough to enrich the capabilities of many types of private businesses. It complements users, applications, networks, devices, and whatnot. However, Microsoft 365 cybersecurity is often compromised and there are countless ways that

Read More »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.