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:

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.

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
Picture of Matt Tinney

Matt Tinney

Professional IT executive & business leader having decades of experience with Microsoft technologies delivering modern-day cloud & security solutions.

Contact Us

=
On Key

More Posts

WME Cybersecurity Briefings No. 028
Cyber Security

WME Security Briefing 27 September 2024

DragonRank SEO Manipulation Campaign Targeting IIS Servers Across Asia and Europe Overview A cyber espionage campaign is targeting IIS servers in several countries across Asia and Europe. The DragonRank campaign emanates from a simplified Chinese-speaking actor and specializes

Click Here to Read Full Article »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.

=