Safe PKI Issuing CA OS Migration (2019 to 2022): Backup/Restore Strategy Without Deleting Old CA First

Sreeram Raju 40 Reputation points
2026-07-28T07:16:47.07+00:00

Hi Everyone,

I am planning an in-place upgrade/migration of an Active Directory-Integrated Enterprise Issuing CA running on Windows Server 2019 to a new Windows Server 2022 virtual machine.

Key Requirements & Constraints:

  1. Quick Rollback: I want to preserve the existing 2019 CA server configuration completely intact during the migration. If the restore on the Server 2022 instance fails or encounters issues, I need to be able to immediately fail back to the Server 2019 CA without extended downtime.
  2. Side-by-Side Validation: Because this is an Enterprise CA, both the Server Name and the CA Name need to remain identical for existing CRL/AIA distributions and certificate template issuance to function seamlessly.

If I build the new Server 2022 machine and restore the CA database/keys using the same CA name while keeping the Server 2019 CA offline (or uninstalled), there is a risk of naming/AD object conflicts if the Server 2019 CA role isn't cleanly uninstalled first. However, if I completely uninstall AD CS from the Server 2019 node first, my safety net for an instant rollback is gone.

Please guide me to do a migration without deleting the OLD CA, so that I can do a side by side comparison during the migration.

Windows for business | Windows Server | Directory services | Certificates and public key infrastructure (PKI)
0 comments No comments

Answer accepted by question author

Steven Nguyen (WICLOUD CORPORATION) 415 Reputation points Microsoft External Staff Moderator
2026-07-28T08:29:19.98+00:00

Hi Sreeram Raju,

To meet your requirements of maintaining the same Hostname/CA Name for CRL/AIA continuity, while keeping the existing CA intact for a rollback, I have compiled the following step-by-step action plan.

Please review the migration phases below:

Phase 1: Pre-Migration Backup (On the existing Server 2019 CA)

Note: We will not uninstall the AD CS role. We are only taking a full backup.

  1. Create a new staging folder at C:\Temp\CABackup.
  2. Document Certificate Templates: Open certsrv.msc -> Right-click Certificate Templates -> Export list -> Save to the backup folder.
  3. (Note: Certificate Templates are stored in Active Directory, not the CA backup. Please take screenshots of the full templates list so we can manually verify them on the new server later).
  4. Backup CA Database & Keys:
    1. In certsrv.msc, right-click your CA -> All Tasks -> Back up CA.
    2. Select both "Private key and CA certificate" and "Certificate database and logs".
    3. Save it to your backup folder.
    4. Set a strong password for the private key file. (Critical: Please ensure this password is documented securely, as the backup cannot be restored without it).
    5. Verify that the database backup contains all 3 required folders.
  5. Backup CA Registry: Open Registry Editor (regedit) -> Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration -> Right-click Configuration -> Export -> Save the .reg file to your backup folder.
  6. Backup PKI View: Open pkiview.msc -> Right-click your Sub CA -> Export list -> Save to the backup folder.
  7. Backup Physical CRLs (Optional but recommended): Copy the entire contents of C:\Windows\System32\CertSrv\CertEnroll to your backup folder.
  8. Safely copy the entire C:\Temp\CABackup folder to a network share or directly to the new Server 2022 VM.

Phase 2: Isolate the Old CA & Prepare Active Directory

  1. Shutdown the Windows Server 2019 CA completely. Do NOT uninstall any roles.
  2. Log on to a Domain Controller with Domain Admin privileges.
  3. Open Active Directory Users and Computers (dsa.msc).
  4. Locate the Computer Object of the CA server.
  5. Right-click the Computer Object and select Reset Account. (Do NOT delete the object).

Phase 3: Deploy the New CA (On Windows Server 2022)

  1. Power on the new Windows Server 2022 VM.
  2. Open sysdm.cpl and rename this server to be identical to your old Server 2019 CA hostname.
  3. Join the server to the domain using a Domain Admin account and restart. (The new server will take over the reset AD computer account).
  4. Once rebooted, open Server Manager and install the Active Directory Certificate Services (AD CS) role. Do not configure it yet.

Phase 4: Restore CA Configuration

  1. Restore Registry: Locate the .reg file in your backup folder, right-click it, and select Merge. (Ensure that the drive letters on the 2022 server match the 2019 server—e.g., if the DB was on the D:\ drive previously, it must be on the D:\ drive now).
  2. Restore Database & Keys:
    1. Open certsrv.msc (it may show the service is stopped).
    2. Right-click the CA node -> All Tasks -> Restore CA.
    3. Select both "Private key and CA certificate" and "Certificate database and logs".
    4. Point the wizard to your backup folder, select the .p12 file, and enter the password you set in Phase 1.
  3. Restart the CA Service: Once the wizard completes, start the Active Directory Certificate Services service.
  4. Validation: Open pkiview.msc to check the health of the CA and CRL distribution points, and ensure the Certificate Templates populate correctly based on your screenshots.

Rollback Procedure

If the Server 2022 CA encounters issues during validation and you need to abort the migration, perform these steps to revert to the 2019 CA:

  1. Shutdown the Server 2022 VM.
  2. On a Domain Controller, open ADUC, right-click the CA's Computer Object, and select Reset Account again.
  3. Power on the old Server 2019 CA.
  4. Open an elevated PowerShell prompt on the 2019 CA and run:
    1. Test-ComputerSecureChannel -Repair -Credential (Get-Credential)
  5. Once the command returns True, restart the 2019 server. This will bring the original CA back online to its pre-migration state.

=========================

If this helps resolve your problem, please consider hitting "Accept Answer" so other users facing this failure can easily find the solution!

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.