Configuration ManagerHow-to

Configuration Manager site recovery step by step: restore the site server and site database

Pick the right setup recovery options, run setup from CD.Latest on a server with the same name, recover CAS or primary sites, and finish every post-recovery task.

When a Configuration Manager (formerly SCCM, also called ConfigMgr or MECM) site server or its database is lost, recovery is a setup operation with a handful of decisions that are hard to undo. In this post I'll walk through choosing the recovery options, running setup from CD.Latest, what changes in a hierarchy, the unattended alternative, and the post-recovery tasks that most runbooks forget. If you haven't prepared yet, start with backup and recovery readiness.

Errors this guide fixes

  • Failed to decrypt cert PFX datadistmgr.log
How this guide is organized: Prerequisites → How it works → Step-by-step → Post-recovery tasks → Verify → Tips and gotchasFlow diagram of the article's sections in reading order: 1. Prerequisites. 2. How it works. 3. Step-by-step (3 steps: Restore the files you need; Run setup from the CD.Latest copy; Or run an unattended recovery). 4. Post-recovery tasks. 5. Verify. 6. Tips and gotchas. Toolbox: ConfigMgrSetup.log, ConfigMgrPrereq.log, Set-CMDistributionPoint, …\Microsoft\SMS, Security › Accounts.1Prerequisites2How it works3Step-by-step1Restore the files you need2Run setup from theCD.Latest copy3Or run an unattendedrecovery4Post-recovery tasks5Verify6Tips and gotchasTOOLBOXConfigMgrSetup.logConfigMgrPrereq.logSet-CMDistributionPoint…\Microsoft\SMSSecurity › AccountsHow this guide is organized: Prerequisites → How it works → Step-by-step → Post-recovery tasks → Verify → Tips and gotchasFlow diagram of the article's sections in reading order: 1. Prerequisites. 2. How it works. 3. Step-by-step (3 steps: Restore the files you need; Run setup from the CD.Latest copy; Or run an unattended recovery). 4. Post-recovery tasks. 5. Verify. 6. Tips and gotchas. Toolbox: ConfigMgrSetup.log, ConfigMgrPrereq.log, Set-CMDistributionPoint, …\Microsoft\SMS, Security › Accounts.1Prerequisites2How it works3Step-by-step1Restore the files you need2Run setup from the CD.Latest copy3Or run an unattended recovery4Post-recovery tasks5Verify6Tips and gotchasTOOLBOXConfigMgrSetup.logConfigMgrPrereq.logSet-CMDistributionPoint…\Microsoft\SMSSecurity › Accounts
At a glance: how this guide is organized · 3 steps · 5 key settings and tools

Prerequisites#

  • Active Directory and DNS are healthy. In a forest-wide outage, Configuration Manager comes after the domain controllers. Follow the AD forest recovery guide first, then bring back PKI and SQL Server, then the CAS, then primary sites. Messaging, such as the Exchange Server recovery, can run in parallel once AD is back.
  • A server with the same hostname and FQDN as the failed site server, domain-joined, meeting the site prerequisites. A newer Windows Server version is fine. Use a clean build; leftover HKLM\SOFTWARE\Microsoft\SMS keys or SMS_* services cause conflicts.
  • The same SQL Server and instance, the same site database name and the same SQL Server Service Broker port. A newer SQL Server version is supported; a different edition isn't.
  • The backup set and a CD.Latest copy that matches the site's version, placed outside the Configuration Manager installation folder.
  • Your site documentation: site code, install path, account passwords, certificates and hotfix list.

How it works#

Which site database recovery option to pick in setupIs the site database intact on a separate SQL Server? if Yes: Skip database recovery (For example, a surviving availability group node.); if No: What database backup do you have? if Backup task set: Recover the site database using a backup set; if SQL or DPM backup: Use a manually recovered database (Restore it on the original instance first, then run setup.); if None: Is the site part of a hierarchy? if Yes: Create a new database for this site (Data replicates from the CAS or a reference primary site.); if No: Reinstall the site; data is lost (Standalone primary without a database backup can't be recovered.)Is the site database intact on aseparate SQL Server?OKSkip databaserecoveryFor example, asurviving availabilitygroup node.YesWhat database backup do youhave?FIXRecover the sitedatabase using abackup setBackup task setFIXUse a manuallyrecovereddatabaseRestore it on theoriginal instancefirst, then run setup.SQL or DPM backupIs the site part of a hierarchy?NOTECreate a newdatabase for thissiteData replicates fromthe CAS or areference primarysite.YesSTOPReinstall the site;data is lostStandalone primarywithout a databasebackup can't berecovered.NoNoneNoWhich site database recovery option to pick in setupIs the site database intact on a separate SQL Server? if Yes: Skip database recovery (For example, a surviving availability group node.); if No: What database backup do you have? if Backup task set: Recover the site database using a backup set; if SQL or DPM backup: Use a manually recovered database (Restore it on the original instance first, then run setup.); if None: Is the site part of a hierarchy? if Yes: Create a new database for this site (Data replicates from the CAS or a reference primary site.); if No: Reinstall the site; data is lost (Standalone primary without a database backup can't be recovered.)Is the site database intact on a separate SQLServer?YesOKSkip database recoveryFor example, a surviving availability group node.NoWhat database backup do you have?Backup task setFIXRecover the site database using a backupsetSQL or DPM backupFIXUse a manually recovered databaseRestore it on the original instance first, then runsetup.NoneIs the site part of a hierarchy?YesNOTECreate a new database for this siteData replicates from the CAS or a referenceprimary site.NoSTOPReinstall the site; data is lostStandalone primary without a databasebackup can't be recovered.
Figure 1 · Decision tree Which site database recovery option to pick in setup. Choose the database option based on what survived and what backup you have. A new database is only possible when another site in the hierarchy can replicate the data back.

Setup treats the site server and the site database as two separate decisions.

Setup optionWhen to use it
Recover the site server using an existing backupYou have a snapshot from the Backup Site Server task. Site settings come back from the backup.
Reinstall the site serverNo site server backup. You re-enter the settings as for a new install, with the same site code and database name.
Recover the site database using a backup setYou have the database from the backup task. Recovery fails if a database with that name already exists.
Create a new database for this siteNo database backup, and the site is in a hierarchy. Data replicates from the CAS (or from a reference primary site when recovering the CAS). Not available for a standalone primary.
Use a site database that has been manually recoveredYou already restored the database with SQL Server or Data Protection Manager.
Skip database recoveryThe database is intact, for example on a surviving availability group node. Only valid when SQL Server is on a different computer from the site server.

In a hierarchy, data loss is limited. A recovered primary site gets global data changes made since the backup from the CAS, and the CAS reinitializes the primary's site data from the recovered site. A recovered CAS pulls changes from its primary sites, or reinitializes global data from a reference site you choose when the backup is older than the five-day change tracking retention period. A standalone primary site simply loses everything changed after the backup; clients resend most of their data over time.

Step-by-step#

1. Restore the files you need#

Copy the backup snapshot and its CD.Latest folder to the new server, for example E:\Restore. If you use a SQL Server or DPM backup, restore the site database on the original instance now. For an availability group, restore on a standalone instance first and move it back afterwards.

2. Run setup from the CD.Latest copy#

Start E:\Restore\CD.Latest\SMSSETUP\BIN\X64\setup.exe as administrator. Don't use the original media or the installation folder: once a site has taken in-console updates, setup from those locations can't recover it. On Getting Started, select Recover a site, then:

  1. Choose the site server option and point it at the backup set.
  2. Choose the database option from the table above.
  3. Confirm the SQL Server name, instance and database name. Keep the Service Broker port that setup detects; changing it breaks database replication after recovery.
  4. When recovering a CAS with an old or missing database backup, pick a reference primary site.
  5. Confirm the installation path. Setup lets you choose a new one, but reusing the original keeps your documentation and scripts valid.
  6. Point setup to the Redist folder in CD.Latest, or let it download current prerequisites.

Follow progress in C:\ConfigMgrSetup.log at the root of the system drive; it records setup and recovery activity. Prerequisite results land in ConfigMgrPrereq.log.

3. Or run an unattended recovery#

For a scripted runbook, build an INI answer file and run setup.exe /script E:\Restore\Recover-PS1.ini from an elevated prompt. There are no defaults, so every required key must be present. This example recovers a standalone primary site server and database from the backup task:

Text
[Identification]
Action=RecoverPrimarySite
CDLatest=1

[RecoveryOptions]
ServerRecoveryOptions=1
DatabaseRecoveryOptions=10
SiteServerBackupLocation=E:\Restore\PS1Backup
BackupLocation=E:\Restore\PS1Backup

[Options]
ProductID=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
SiteCode=PS1
SMSInstallDir=D:\Program Files\Microsoft Configuration Manager
SDKServer=cm01.contoso.com
PrerequisiteComp=1
PrerequisitePath=E:\Restore\CD.Latest\Redist
AdminConsole=1
JoinCEIP=0

[SQLConfigOptions]
SQLServerName=cmsql01.contoso.com
DatabaseName=CM_PS1
SQLSSBPort=4022

[CloudConnectorOptions]
CloudConnector=0

Key values: ServerRecoveryOptions is 1 (site server and SQL Server), 2 (site server only) or 4 (SQL Server only). DatabaseRecoveryOptions is 10 (restore from backup), 20 (manually recovered), 40 (create new database) or 80 (skip). Use Action=RecoverCCAR for a CAS, add ReferenceSite when you create a new database, and add CCARSiteServer in a [HierarchyExpansionOption] section for a child primary site. Match CloudConnector to how the site was configured before the failure.

Post-recovery tasks#

The setup Finished page lists the accounts to fix and the hotfixes to reinstall, and saves the same list to C:\ConfigMgrPostRecoveryActions.html. Work through it:

  1. Re-enter account passwords: Administration › Security › Accounts, open each listed account, Set the password, then Verify and Test connection.
  2. PXE and task sequence passwords: re-enter the PXE password on each PXE-enabled distribution point, and passwords in task sequence steps such as Apply Network Settings, Join Domain or Workgroup, Run Command Line and Run PowerShell Script.
  3. Sideloading keys: re-enter them. The Activations used count resets to 0, so adjust your tracking.
  4. Hotfixes: reinstall any out-of-band hotfixes from the list.
  5. Certificates: rebind the IIS web server certificate on HTTPS roles. If distmgr.log shows Failed to decrypt cert PFX data, regenerate or reimport the distribution point certificate with Set-CMDistributionPoint. In non-PKI environments, recreate bootable and prestaged media. Restore any SQL Server encryption certificate used for BitLocker management recovery data.
  6. Cloud services: if cloudmgr.log reports an index error, renew the secret key for each Azure tenant connection. After a CAS recovery, recreate external notification subscriptions.
  7. Content: restore the content library and package sources to their original paths, or import a prestaged content file or run Update Content per package.
  8. Reporting and software updates: restore custom reports from the report server backup, and confirm the software update point syncs (wsyncmgr.log, WCM.log); the WSUS sync troubleshooting guide helps if it doesn't.

Verify#

  • ConfigMgrSetup.log ends without errors and the console connects to the site.
  • Monitoring › System Status › Site Status and Component Status are green, with no new install errors in sitecomp.log.
  • Monitoring › Database Replication shows every link as active; rcmctrl.log records the replication activity. After a CAS recovery, if hardware inventory or status messages from child sites don't replicate, reenable the ConfigMgrDRSSiteQueue on the CAS database:
Text
IF EXISTS (SELECT * FROM sys.service_queues
           WHERE name = 'ConfigMgrDRSSiteQueue' AND is_receive_enabled = 0)
    ALTER QUEUE [dbo].[ConfigMgrDRSSiteQueue] WITH STATUS = ON
  • Monitoring › Distribution Status › Content Status shows content as successful; use Validate on distribution points that report problems (see the content distribution guide).
  • A test client receives policy, a test deployment installs, and reports run from the reporting services point.

Tips and gotchas#

  • Running setup on a server that still hosts the site disables the site server recovery option; start from a clean server.
  • On a child primary, don't uninstall the site to "clean" the server. The CAS loses contact with it and the recovery fails.
  • If at least one availability group node survives, choose Skip database recovery.
  • Secondary sites have no backup: use Recover Secondary Site in Administration › Site Configuration › Sites, with the same FQDN, installation path and SQL Server instance.
  • Database replicas for management points need their publications and subscriptions recreated after a database restore.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)