Active Directory Backup and Restore: System State and DSRM

How Active Directory restore is done in practice: system state backup, tombstone lifetime, Recycle Bin, authoritative restore with DSRM, SYSVOL and forest recovery.
Technical summary
Technology
Active Directory, Windows Server Backup, wbadmin, ntdsutil, DFSR, PowerShell
Topic
AD system state backup and restore by scenario
Level
Advanced
Prerequisites
  • AD DS administration experience
  • Domain Admin rights
  • DSRM password
In this article9 sections

Multiple domain controllers (DCs) tolerate the loss of one DC; but replication doesn’t recover an accidentally deleted OU, corrupted Group Policy objects, or the loss of a single-DC environment. Replication copies the mistake too. A deleted OU is gone from all DCs within a few minutes. Below we explain routine backup of AD and the right restore method by scenario: system state backup, AD Recycle Bin, non-authoritative and authoritative restore with DSRM, SYSVOL restore and forest recovery principles.

AD recovery scenarios

In AD, “restore” isn’t a single operation; the method is chosen by the scope of the loss. The wrong method doesn’t solve the problem; it spreads it to all DCs through replication.

Scenario Recommended method
A single user, group or OU was deleted AD Recycle Bin
An object was deleted while the Recycle Bin was off Authoritative restore (subtree)
One DC failed, other DCs are healthy Remove the failed DC, do metadata cleanup and build a new DC (the preferred path); non-authoritative restore if needed
GPOs or SYSVOL contents were corrupted Restore from a GPO backup, or SYSVOL authoritative restore
Loss of the DC in a single-DC environment System state or full server restore
The entire forest has been compromised or corrupted Forest recovery procedure

In a system infrastructure with healthy DCs, instead of restoring the failed DC, removing the server, doing metadata cleanup and building a new DC is usually the faster and cleaner path. Adding a new DC and transferring FSMO roles is described in the domain controller replacement and FSMO transfer article.

System state backup and tombstone lifetime

A DC’s system state backup includes the AD database (ntds.dit), SYSVOL, the registry, boot files and, if installed on the DC, the certificate services database. It can be taken with Windows Server Backup:

# Install the Windows Server Backup feature
Install-WindowsFeature Windows-Server-Backup

# Take a system state backup to a separate volume
wbadmin start systemstatebackup -backupTarget:E: -quiet

# List existing backups
wbadmin get versions

Use a dedicated volume other than the system volume as the target. Application-aware image backups such as Veeam also back up the DC consistently with VSS and offer AD object-level restore; in that case a separate wbadmin backup isn’t required. But test in advance how the restore will be done with which method. A common situation is assuming the DC is being backed up while, because of a VSS error in the job, only crash-consistent copies have been taken for weeks.

The tombstone lifetime limits how long an AD backup can be used. Deleted objects are kept as “tombstones” for this period, then removed completely. In forests created with Windows Server 2003 SP1 and later, the default value is 180 days; in environments upgraded from older forests, it may be 60 days. Restoring a backup older than the tombstone lifetime isn’t supported; it leads to deleted objects coming back to life (lingering objects) and replication problems. Check the value in your own forest:

$cfg = (Get-ADRootDSE).configurationNamingContext
Get-ADObject "CN=Directory Service,CN=Windows NT,CN=Services,$cfg" `
  -Properties tombstoneLifetime | Select-Object tombstoneLifetime

If the value comes back empty, the attribute isn’t defined and the old default of 60 days applies; build the backup retention plan accordingly. Rule of thumb: in every domain, at least one, preferably two DCs are backed up daily, and at least a few weeks of backup history are kept.

Deleted object: AD Recycle Bin

If AD Recycle Bin is enabled, a deleted object comes back with all its attributes and group memberships, without restarting the DC or entering DSRM. It requires the forest functional level to be at least Windows Server 2008 R2 and can’t be turned off after it is enabled. If it is off, plan to enable it; the operation can’t be reversed.

# Enable the Recycle Bin (forest-wide, irreversible)
Enable-ADOptionalFeature -Identity "Recycle Bin Feature" `
  -Scope ForestOrConfigurationSet -Target "contoso.local"

# Find the deleted user and bring it back
Get-ADObject -Filter 'sAMAccountName -eq "ayse.yilmaz"' -IncludeDeletedObjects |
  Restore-ADObject

If the contents of a deleted OU are to be brought back, the OU itself is restored first, then the objects in it; child objects don’t come back if the parent object doesn’t exist. The Recycle Bin doesn’t bring back the SYSVOL files of Group Policy objects; take separate, regular backups of GPOs with Backup-GPO -All -Path.

Non-authoritative restore

A non-authoritative restore returns the DC to the moment the backup was taken; after the DC restarts, it receives the changes since the backup from its replication partners. The restored data isn’t “authoritative,” i.e. it doesn’t overwrite newer information on the other DCs. Use case: repairing a DC whose database is corrupted while healthy partners exist. When there are healthy DCs, rebuilding the DC is usually preferred over restoring it. Bringing back a single object, SYSVOL recovery and forest recovery are separate scenarios and are described under separate headings below.

System state restore requires Directory Services Restore Mode (DSRM). The DSRM password is set when the DC is installed and is often forgotten. If the password isn’t known, reset it while the DC is running:

# Reset the DSRM password (while the DC is running)
ntdsutil "set dsrm password" "reset password on server null" q q

# Boot into DSRM at the next startup
bcdedit /set safeboot dsrepair
shutdown /r /t 0

# In DSRM: restore the system state
wbadmin get versions
wbadmin start systemstaterecovery -version:11/09/2026-21:00 -quiet

# Return to normal boot when done
bcdedit /deletevalue safeboot
shutdown /r /t 0

In DSRM, you sign in as the local administrator, with the .\Administrator account and the DSRM password. After the restart, verify with repadmin /showrepl and dcdiag that replication has completed. Forgetting the bcdedit /deletevalue safeboot step makes the DC drop back into DSRM at every boot; this is the first place to look on the console.

Authoritative restore and ntdsutil

Authoritative restore is used to bring back deleted objects when the Recycle Bin isn’t available or can’t be used. A non-authoritative restore is done first; then, without restarting the DC and while still in DSRM, the objects to bring back are marked “authoritative.” ntdsutil raises the version numbers of these objects, so in replication the restored state wins over the deleted (tombstone) state on the other DCs.

# In DSRM, after the system state restore and before restarting
ntdsutil
activate instance ntds
authoritative restore
restore subtree "OU=Sales,DC=contoso,DC=local"
quit
quit

For a single object, restore object "CN=Ayse Yilmaz,OU=Sales,DC=contoso,DC=local" is used. The command creates a text file and an .ldf file for group memberships in the current directory. The restored users’ memberships in groups in other domains or outside the subtree (back-links) come back by importing this file after the DC boots normally and replication completes:

ldifde -i -k -f ar_20261109-210512_links_contoso.local.ldf

The real trap is the scope: if the whole subtree is marked authoritative, legitimate changes made in that subtree after the backup (password resets, new memberships) are overwritten by the old state in the backup. Keep the scope as narrow as possible. Ask first whether one object would do instead of an OU.

SYSVOL restore

SYSVOL is replicated with DFS Replication (DFSR). In a normal system state restore, SYSVOL comes back non-authoritatively and is updated from the other DCs. If SYSVOL is corrupted on all DCs or GPO files have been deleted, SYSVOL must be restarted authoritatively from a single DC. In a restore with wbadmin, the -authsysvol parameter is used for this purpose. Independent of the backup, the steps for an authoritative restart of DFSR SYSVOL, as documented by Microsoft, are:

  1. On the DC chosen as the authoritative source (preferably the PDC emulator), set msDFSR-Enabled=FALSE and msDFSR-options=1 on the object CN=SYSVOL Subscription,CN=Domain System Volume,CN=DFSR-LocalSettings,CN=<DC name>,OU=Domain Controllers,DC=….
  2. On all other DCs, set only msDFSR-Enabled=FALSE on the same object.
  3. Force AD replication (repadmin /syncall /AdP) and stop the DFSR service on all DCs.
  4. Start DFSR on the authoritative DC; event 4114 (SYSVOL replication disabled) appears in the event log. Then set msDFSR-Enabled=TRUE, force AD replication and run dfsrdiag pollad; event 4602 shows that the authoritative start has completed.
  5. Start DFSR on the other DCs; after 4114 appears, set msDFSR-Enabled=TRUE and run dfsrdiag pollad; events 4614 and 4604 show that the initial synchronization has finished.

In this operation, the SYSVOL content on the authoritative DC is taken as correct and distributed to the others. Before starting, check that the Policies folder on that DC is intact. A corrupted source carries the corruption everywhere.

Forest recovery principles

If all DCs are corrupted or the forest has lost its trustworthiness, repairing DCs one by one isn’t enough. The basic principles in Microsoft’s forest recovery guide: for each domain, a single DC is restored from a trusted backup on an isolated network; SYSVOL is started authoritatively on this DC; FSMO roles are seized to these DCs; the metadata of all other DCs is cleaned up; the RID pool is raised, and the krbtgt and privileged account passwords are reset; then additional DCs are rebuilt. The detailed roadmap is in the Active Directory Forest Recovery Guide.

Choosing a clean recovery point after ransomware and forest recovery in an isolated environment are described from the security side in the AD forest recovery after a ransomware attack guide.

Checklist

  • At least one DC in every domain is backed up daily; the backup age is well below the tombstone lifetime.
  • AD Recycle Bin is enabled.
  • GPOs are backed up separately with Backup-GPO.
  • The DSRM password is known and kept in a secure vault.
  • Restoring a DC on an isolated network is tested at least once a year.
  • The steps needed for forest recovery are written in the DR runbook.

To monitor AD’s overall health regularly, see the Active Directory health check article. For directory service management and backup setup, see our server and cloud management and backup and disaster recovery service pages.

Frequently asked questions

Can AD Recycle Bin be turned off after it is enabled?

No. AD Recycle Bin is enabled forest-wide and can’t be reversed. The forest functional level must be at least Windows Server 2008 R2.

Can an AD backup older than the tombstone lifetime be restored?

It isn’t supported. A backup older than this period brings back objects permanently deleted on the other DCs; lingering objects and replication problems start. The age of the backup should always be well below the tombstone lifetime.

What is the difference between non-authoritative and authoritative restore?

A non-authoritative restore returns the DC to the moment the backup was taken and receives updates from the other DCs. An authoritative restore marks the selected objects as authoritative; these objects overwrite the deleted or changed state on the other DCs.

What if the DSRM password has been forgotten?

While the DC runs in normal mode, the password is reset with the set dsrm password command in the ntdsutil tool. Do this before a disaster and keep the new password in a secure vault.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek System Support

Server installation, configuration, incident response and scheduled maintenance. Active Directory, virtualization and backup are managed with the same discipline.

Knowledge Center

Other articles