Windows Server 2012 AD Backup and Disaster Recovery Procedures
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Version: 1.2
Windows Server 2012 AD Backup and Disaster Recovery Procedures
1. Contents
1. CONTENTS ..................................................................................................................................... 2
2. CONTACT INFORMATION .................................................................................................................. 4
3. VERSION CONTROL ......................................................................................................................... 5
4. TERMS AND ABBREVIATIONS ............................................................................................................ 5
5. INTRODUCTION ............................................................................................................................... 6
6. SCOPE .......................................................................................................................................... 6
7. AGREEMENTS ................................................................................................................................. 6
8. ACTIVE DIRECTORY CONTENT BACKUP AND RESTORE METHODS .......................................................... 7
8.1 System State Backup............................................................................................................... 7
8.1.1 Why, despite the Recycle Bin Feature? ............................................................................... 7
8.1.2 Backup Modes .................................................................................................................... 8
8.1.3 Backup Targets .................................................................................................................. 8
8.1.4 Backup Versioning .............................................................................................................. 8
8.2 Active Directory Recycle Bin .................................................................................................... 9
8.3 Active Directory Snapshot Backups ....................................................................................... 11
8.4 Tombstone Reanimation ........................................................................................................ 11
8.5 Virtual Machine Snap Shots ................................................................................................... 11
9. INSTALLING AND CONFIGURING BACKUPS ........................................................................................ 12
9.1 System State Backup............................................................................................................. 12
9.2 Snapshot Backups ................................................................................................................. 13
9.2.1 Manual Snapshots ............................................................................................................ 13
9.2.2 Scheduled Snapshots ....................................................................................................... 14
9.3 Enable Active Directory Recycle Bin ...................................................................................... 14
9.4 Configuring Garbage collection process ................................................................................. 15
9.4.1 Without Recycle Bin .......................................................................................................... 15
9.4.2 With Recycle Bin............................................................................................................... 16
10. W HEN TO RESTORE ...................................................................................................................... 16
11. W HERE TO RESTORE .................................................................................................................... 17
12. COMMON TASKS ........................................................................................................................... 17
12.1 Remove Domain Controller from DNS.................................................................................... 17
12.2 Remove Domain Controller from Active Directory................................................................... 17
12.3 Change the Active Directory Restore Mode (DSRM) Administrator Password ......................... 19
12.4 Restore your Backups files to restore from ............................................................................. 19
12.5 How to Disable Initial Replication ........................................................................................... 20
12.6 Verification of a Successful Restore ....................................................................................... 21
12.7 Verification of a Successful Backup ....................................................................................... 21
13. ACTIVE DIRECTORY CONTENT RECOVERY ....................................................................................... 21
13.1 Overview ............................................................................................................................... 21
13.1.1 Authoritative Restore ........................................................................................................ 22
13.1.2 Non-Authoritative Restore ................................................................................................. 22
13.2 Recovery through System State Backup ................................................................................ 22
13.2.1 Non-Authoritative Restore ................................................................................................. 22
13.2.2 Authoritative Restore ........................................................................................................ 23
13.3 Recovery through tombstone object reanimation .................................................................... 25
13.3.1 Authoritative Restore through LDP.exe ............................................................................. 25
13.3.2 Authoritative Restore through ADRestore.exe ................................................................... 26
13.4 Active Directory Recovery through Snapshots ........................................................................ 27
13.5 Active Directory Restore through Recycle Bin ........................................................................ 28
13.5.1 Restore Through AD Administrative Center ....................................................................... 28
13.5.2 Restore Through Power Shell ........................................................................................... 28
13.6 Restoring Back-Links ............................................................................................................. 30
13.6.1 Restore group memberships through NTDSUTIL and LDIFF ............................................. 30
13.6.2 Restore security principals two times ................................................................................ 31
14. ENTIRE DOMAIN CONTROLLER RECOVERY ...................................................................................... 31
2/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
3/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
2. Contact Information
IT doesnt matter
Even in our fast growing world of technology, IT became a commodity the same way as
electricity did. Its not the software, hardware or technologies that will make the difference, but
the way how you design, implement, maintain and use it. Speaking personally, as an architect,
software, hardware and technology as such are not that important. They are only a way to
create a stable, reliable and secure IT infrastructure to meet all your business and technical
needs. Cost reductions, flexibility and future scalability are key words in every project Im
involved with.
EDE Consulting
EDE Consulting was formed in 2006. Though a young company, all our IT professionals are senior
consultants with 10 to 20 years of experience in IT business. EDE Consulting has extensive
experience with everything related to enterprise system management, network management,
system migration and integration, and this at consultancy, architectural and implementation
level.
While you take care of your core business, EDE Consulting looks after your IT infrastructure.
We think beyond the technical aspects of IT. If, for example, we design a disaster recovery
procedure, this procedure includes all documentation, personal procedures, access lists, and so
on.
Among our current customers you will find: Fortis, Dexia, ING, Oleon, AGF, KUL, Vodafone
Germany, RIZIV, Besix, ...
http://www.linkedin.com/pub/peter-van-keymeulen/3/531/783
4/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
3. Version Control
Version Status Date Authors Changes
V1.0 Initial 17.09.2012 Van Keymeulen Peter
V1.1 Update 15.04.2013 Van Keymeulen Peter
V2.2 Update 17.12.2013 Van Keymeulen Peter
5/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
5. Introduction
It must be somewhere in the late nineties, after struggling with Windows NT 4 domains for
years, that I became involved with the Windows 2000 Academy developed and organized @
Digital. The very first impressions about Active Directory caused me to fell of my chair several
times a day, surprised that I was about this technology. Although Windows 2003 and 2008 were
necessary and useful releases, I waited till Windows 2012 to get exactly the same wow feeling as
fifteen years ago while discovering all new Windows Server 2012 features.
Yet, Active Directory, still is a core infrastructure layer in your organization, storing all enterprise
wide user and computer accounts, your Exchange and mailbox configurations, Lync related
objects, SSCM and SCOM objects, AD integrated DNS and used as authentication and
authorization service.
Active Directory became so important and mission critical for your business that it forces you to
understand, implement and test efficient and reliable backup and disaster recovery procedures.
This document deals with Active Directory related backup and disaster recovery aspects as they
exists in the Server 2012 RTM, build 9200 release.
6. Scope
This document tackles all possible scenarios, mechanisms and techniques related to Active
Directory Backup and Disaster Recovery.
7. Agreements
All Windows Power Shell commands using in this document are written down as:
Add-Windowsfeature windows-server-backup includeallfeature
6/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
The system state data includes at least the following data, plus additional data, depending on
the server roles that are installed:
Registry
COM+ Class Registration database
Boot files
Active Directory Certificate Services (AD CS) database
Active Directory database (Ntds.dit)
SYSVOL directory
Cluster service information
Microsoft Internet Information Services (IIS) metadirectory
System files that are under Windows Resource Protection
Active Directory Federation Services
When you use Windows Server Backup to back up the critical volumes on a domain controller,
the backup includes all data that resides on the volumes that include the following:
The volume that hosts the boot files, which consist of the Bootmgr file and the Boot
Configuration Data (BCD) store
The volume that hosts the Windows operating system and the registry
The volume that hosts the SYSVOL tree
The volume that hosts the Active Directory database (Ntds.dit)
The volume that hosts the Active Directory database log files
To use the recycle bin, you need to be able to log on to the domain. This isnt
possible when you lost the entire domain.
7/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
When someone deletes group memberships without deleting the accounts and
groups involved, only a system state restore can be used to restore the
memberships. Membership deletions as such are not stored in the deleted objects
because they arent objects, they are only attributes. Deleting group memberships
only updates attributes.
Imaging someone only changes a huge amount of attributes and objects in your AD
without deleting anything. Only a System State restore can be used to recover.
Scheduled backup
A member of the Administrators group can use the Windows Server Backup or the
Wbadmin.exe command-line tool to schedule backups. The scheduled backups must be
made on a local, physical drive that does not host any critical volumes or on any remote
share. Allowing backing up onto system critical volumes can no longer be forced through
registry settings as it was in Windows 2008 and 2008R2.
Wbadmin scheduled backups can have local disks as well as a remote share as backup
target.
All Windows 2012 volume types are supported: NTFS and ReFS.
UNC path to the local server, even if its a shared folder on a critical disk, which is, of
course, not a good idea. This is a VSS Copy Backup by default.
UNC path to remote server. This is a VSS Copy Backup by default.
Local Non-Critical Volume. Any local connected disk can be used to store system
states backups as long the volume is not part of the systems state backup. The
volume can be created on top of a physical local disk or on top of a storage pool.
This is a VSS Copy Backup by default.
Local Critical Volumes. This is no longer supported, even if you add the
AllowSSBToAnyVolume parameter to the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wbengine\SystemStateBackup
Name: AllowSSBToAnyVolume
Data type: DWORD
Value data: 1
For more information about this Windows Server 2008 and 2008R2 parameter,
please refer to: http://support.microsoft.com/kb/944530
8/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Except from the first backup, System State backups are by default always
differential.
A scheduled System State backup to an UNC path is always differential and only the
latest version can be viewed and restored. So, no versioning on UNC path based
System State Backups. The backup target folder will be renamed every time a new
backup starts.
A manual started System State backup to an UNC path is always differential and only
the latest version can be viewed and restored. So, no versioning. The backup target
folder will be renamed every time a new backup starts.
A scheduled System State backup to a local non-critical volume is always differential,
only one backup target folder exists but versioning is enabled. The backup target
folder name contains the last backup date. The folder will be automatically renamed
with each backup.
A Manual started System State backup to a local non-critical volume is always
differential by default, only one backup target folder exists but versioning is enabled.
The backup target folder name contains the last backup date. The folder will be
automatically renamed with each backup.
Versioning is only possible with local volume targets.
A manual full backup (-vssful -allcritical) is never possible, regardless the target type
(UNC or Volume)
Although vssful forces a full backup, only the deltas are written down to disk.
What actually happen is that VSS updates each files history to reflect that is was
backed up.
Differential Full
Backup Target Scheduled Manual Scheduled Manual Versioning
UNC Path OK OK OK X NO
Local Disk OK OK OK X YES
When you enable Active Directory Recycle Bin, all link-valued and non-link-valued attributes of
the deleted Active Directory objects are preserved and the objects are restored in their entirety
to the same consistent logical state that they were in immediately before deletion. For example,
restored user accounts automatically regain all group memberships and corresponding access
rights that they had immediately before deletion, within and across domains.
By default, Active Directory Recycle Bin in Windows Server 2012 is disabled. After you enable
Active Directory Recycle Bin in your environment, you cannot disable it.
9/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
When Active Directory Recycle Bin has not been enabled, objects are stripped down and marked
Tombstoned. The Garbage collection process will delete these objects when the Tombstone Life
Time has been expired.
When the Active Directory Recycle Bin has been enabled, deleted object are no longer
tombstoned but they receive a Deleted status. In this status, all attributes are preserved.
Objects are in the Recycled status when the deleted life time expires. In this status, most of the
attributes are stripped of and lost. This is the equivalent state of a tombstoned object in
Windows 2003. The garbage collection process physically deletes the object from the AD
database when the Recycled Life Time has been expired.
Using the recycling bin to restore deleted objects, please keep in mind that:
You cant restore objects from which the parent object has been deleted. If you
delete an OU, together with all child objects (user objects for example), its not
possible to restore the user accounts without first restoring the OU (the user
account object parent), unless you restore the object into another location.
Using the Active Directory Administrative Center, you can restore an object to any
location into your directory, regardless the objects original location.
1
Source: Microsoft Technet
2
Source: Microsoft Technet
10/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Using the Active Directory Administrative Center, you can select multiple objects to
restore at once, but child objects are not restored automatically if you only select
the parent OU object. You have to select the child objects as well.
You cannot use the recycle bin to restore group memberships should someone only
deletes or change group memberships without deleting the users or groups
involved.
AD snapshots, when mounted and connected to, allow you to see how the AD Database looked
like at the moment of the snapshot creation, what objects existed and other type of information.
However, out of the box, it does not allow you to move or copy items or information from the
snapshot to the live database. In order to do that you will need to manually export the relevant
objects or attributes from the snapshot, and manually import them back to the live AD database.
Active Directory Snapshots are not created to use as a real restore mechanism. Its more a way
to find differences in Active Directory over time without the need to reboot a domain controller
into the AD restore mode and restore the entire or parts of the database authoritatively.
Tombstone reanimation changes the deleted objects attributes directly in the AD database and
isnt something you should do often, its really a worst case scenario.
11/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Microsoft does not support any other process that takes a snapshot of the elements of a
Windows Server 2003, 2008 and 2008R2 Active Directory domain controller's system state and
copies elements of that system state to an operating system image. Unless an administrator
intervenes, such processes cause a USN rollback. This USN rollback causes the direct and
transitive replication partners of an incorrectly restored domain controller to have inconsistent
objects in their Active Directory databases.
As from Windows Server 2012, Microsoft introduces a new mechanism to protect the Active
Directory against an USN rollback, when restoring virtual server snapshots outside the control of
the OS, by meaning of a new attributed on the domain controller computer account object:
msDS-GenerationId, called the VM-Generation Id.
VM-Generation ID
Virtualized domain controller cloning relies on the hypervisor platform to expose an identifier
called VM-Generation ID to detect creation of a virtual machine. AD DS initially stores the value
of this identifier in its database during domain controller promotion. When the virtual machine
boots up, the current value of the VM-Generation ID from the virtual machine is compared
against the value in the database. If the two values are different, the domain controller resets
the Invocation ID and discards the RID pool, thereby preventing USN re-use or the potential
creation of duplicate security-principals.
At the time of writing, only Windows 2012 Hyper-V supports the VM-Generation ID and domain
controller snap shot restores from within the hypervisor.
Logon to the system with at least domain controller local administrator privileges
From the Power Shell prompt, execute the following commands:
add-windowsfeature windows-server-backup includeallsubfeature
[enter]
Logon to the system with at least domain controller local administrator privileges
From the Power Shell prompt, execute the following commands:
remove-windowsfeature windows-server-backup [enter]
Logon to the system with at least domain controller local administrator privileges
From the command prompt, execute the following command:
12/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Logon to the system with at least domain controller local administrator privileges
From the command prompt, execute the following command:
Wbadmin start systemstatebackup backuptarget :<drive> -quiet
The vssfull and allcritical Wbadmin parameters are not supported with the start
systemstatebackup command.
To find out all System State Backups stored on your domain controller:
Logon to the system with at least domain controller local administrator privileges
From the command prompt, execute the following command:
Logon to the system with at least domain controller local administrator privileges
From the command prompt, execute the following command:
Logon to the system with at least domain controller local administrator privileges
From the command prompt, start NTDSUtil
To activate the current instance of NTDS, type: Activate Instance NTDS
Enter: snapshot to change to the snapshot part of NTDSUtil
Enter: create to create a snapshot
Enter: list all to view all current snapshots. This command does not only list the
snapshots made by NTDSUtil, but all snapshots, those made by your system state
backups too.
13/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Logon to the system with at least domain controller local administrator privileges
From the command prompt, initiate the following command:
ntdsutil snapshot activate instance ntds create quit quit
Second, be aware that enabling the recycle bin is an irreversible operation. Once enabled, you
can never disable it again.
You must prepare the forest and the domain before enabling the Active Directory Recycle Bin if
you upgraded an existing pre-Windows 2008 R2 operating system to Windows 2008 R2 or
Windows 2012. Prepare the forest by executing the adprep /forestprep on the Schema Master.
Prepare the domain by executing the adprep /domainprep /gpprep on the infrastructure
master. And finally, upgrade both, the domain and functional level to at least Windows Server
2008 R2.
To enable the Active Directory Recycle Bin through Active Directory Administrative Center:
From the Administrative Tools, start the Active Directory Module for Windows Power
shell
Execute the following command:
Import-module ActiveDirectory
For example:
Enable-ADOptionalFeature -Identity CN=Recycle Bin
Feature,CN=Optional Features,CN=Directory Service,CN=Windows
NT,CN=Services,CN=Configuration,DC=edeconsulting,DC=local
-Scope Forest
-Target edeconsulting.local
14/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Garbage collection time frames are very important. As a general rule, you always should have at
least one ADS system state backup younger than the Tombstone lifetime.
In Windows Server 2000, 2003 and 2003 R2, the Tombstone Lifetime is 60 days by
default when the tombstoneLifetime value is <not set>. Microsoft recommends
setting the tombstoneLifetime manually to 180 days when upgrading from Windows
Server 2000, 2003 and 2003 R2.
In Windows Server 2003 SP1, 2003 SP2, 2008 and 2008 R2 the Tombstone Lifetime is
180 days by default when the tombstoneLifetime value is <not set>.
In a new deployed Windows 2012 forest, the tombstoneLifetime attribute is
explicitly set to 180 days by default.
Where DC=<> contains the domain name and <value> contains the number of
days.
15/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Please refer to 9.4.1.Without Recycle Bin to know how to configure the tombstone lifetime.
Open the Active Directory Module for Windows PowerShell running in an Administrator
security context.
Type the following command:
Set-ADObject -Identity CN=Directory Service,CN=Windows NT,
CN=Services, CN=Configuration, DC=<>,DC=<> Partition
CN=Configuration, DC=<>,DC=<> Replace:@{ msDS-
DeletedObjectLifetime = <value>}
Where DC=<> contains the domain name and <value> contains the number of
days.
A backup older than the tombstone lifetime set in Active Directory is not considered to be a
good backup.
Active Directory protects itself from restoring data older than the tombstone lifetime. For
example, lets assume that we have a user object that is backed up. If after the backup the
object is deleted, a replication operation is performed to the other DCs and the object is
replicated in the form of a tombstone. After 180 days, all the DCs remove the tombstone as part
of the garbage collection process. This is a process routinely performed by DCs to clean up their
copy of the database.
If you attempt to restore the deleted object after 180 days, the object cannot be replicated to
the other DCs in the domain because it has a USN that is older than the level required to trigger
16/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
replication. And the other DCs cannot inform the restored DC that the object was deleted, so the
result is an inconsistent directory.
Since the system state contains drivers for network and Raid controller hardware, never restore
a system state backup on servers with other hardware than the original server.
Never restore a system state backup which is older than the tombstone lifetime because this can
create lingering objects. Lingering objects can occur if a domain controller does not replicate for
an interval of time that is longer than the tombstone lifetime (TSL). The domain controller then
reconnects to the replication topology. Objects that are deleted from the Active Directory
service when the domain controller is offline can remain on the domain controller as lingering
objects.
Ask your local DNS team to remove the domain controller from DNS. Remind them that they
have to:
Delete the A and PTR record form the DNS zone for which this server was a Domain
Controller.
Delete the A record for the domain for which this server was a Domain controller.
Delete all SRV records for the domain controller in his own zone and the zone of the
root domain.
Delete the CNAME record for the domain controller
Delete the A record from the gc._msdcs.<FQDN> DNS zone of the root domain if the
domain controller was a global catalog.
17/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Depending of the situation from which you want to recover from, the tools to use might be
different.
When there are still other domain controllers of the same domain active:
Open the MMC Active Directory Site and Services Settings snap-in and select the
site from which you deleted the domain controller.
Select the to be removed server and delete this object from AD.
On each server, remove all connection objects coming from the removed server.
Open the MMC Active Directory Users and Computers snap-in and select the
domain from which you removed the server.
From the View menu, select Advanced Features.
In right pane, navigate to the System container
Select the DFSR-GlobalSettings container
Select the Domain System Volume container
Select the Topology container and be sure that the removed server doesnt have
an object in this container. If it does, remove it.
Return to the root of the domain.
Remove the domain controllers computer account from the Domain Controller
container (if it still exists).
If MOM has been used to monitor Active Directory, Remove the domain controllers
account from MOMLatencyMonitors.
If SCOM has been used to monitor Active Directory, Remove the domain controllers
account from OpsMgrLatencyMonitors.
If youre working on the last remaining domain controller, use ADSI Edit:
18/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
From the left pane, right click on ADSI Edit, select connect to
In the computer part of the window, enter the domain name for which the DC
serves as a domain controller and select OK
In right pane, navigate to the System container
Select the DFSR-GlobalSettings container
Select the Domain System Volume container
Select the Topology container and be sure that the removed server doesnt have
an object in this container. If it does, remove it.
Return to the root of the domain.
Remove the domain controllers computer account from the Domain Controller
OU (if it still exists).
If MOM has been used to monitor Active Directory, Remove the domain controllers
account from MOMLatencyMonitors.
If SCOM has been used to monitor Active Directory, Remove the domain controllers
account from OpsMgrLatencyMonitors.
From the left pane, right click on ADSI Edit, select connect to
In the Select the well-known naming context part of the window, select
Configuration and OK
In the right Pane, navigate to the sites container
Select the site of the domain controller you want to remove
Select servers container
Select the DC name of the DC you want to remove
Select NTDS Settings container
Delete all connection objects from this container, if any
Move back one level (up) to the NTDS Settings container and delete the NTDS
Settings container
Move back one level (up) to the domain controller container for the DC you want to
remove and delete the domain controller (despite the warning)
Close ADSI edit
12.3 Change the Active Directory Restore Mode (DSRM) Administrator Password
Change Directory Services Restore Mode Administrator password if you dont know it. Every
domain administrator can change the DSRM Administrator Password. This account and
password can only be used on a Domain Controller booted in the Active Directory Restore
mode.
19/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Imagine that you have only one domain controller, which is not preferable, on which you make
Windows Backup based system state backups stored on a local hard drive. This hard drive, in
turn, has been backed up with a third party product (think about BackupExec or Tivoli ) to
maintain backups of our VSS backup volume offsite.
Some disaster happens and you install new server hardware to be restored as the original
domain controller somewhere on another location. How should you proceed when you
recovered your backup files from your third party backup system onto the local hard drive of
your new installed server? Your server will not be aware of these backups since they were not
created on that server. There is a great change that Windows Backup is not even installed.
Install Windows Backup, reconstruct the backup catalog using the wbadmin command
and recover your system state
o To restore the catalog
Wbadmin restore catalog backuptarget:<location>
o To get version from which you want to restore
Wbadmin get versions
For the Catalog process to be successful, the path to the backup files should start at the level
where WindowsImageBackup is in the path. If you copy the backup files to a local attached disk,
the structure should be as follows:
<localdrive>:\WindowsImageBackup\<computername>\...
c:\serverbackups\win2k8\<computername>\...
If this is the first domain controller and it is a Windows 2012 operating system. Then you need to
add a registry key to avoid AD DS being unavailable until it has completed replication of a
writeable directory.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\NTDS\Parameters\
Name: Repl Perform Initial Synchronizations
Data type: DWORD
Value data: 0
After the forest is recovered completely, you must reset the value of this entry to 1, which
requires a domain controller that restarts and holds operations master roles to have successful
AD DS inbound and outbound replication with its known replica partners before it advertises
itself as domain controller and starts providing services to clients.
20/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Reboot in normal mode. If the domain controller is able to successfully boot into
normal mode, it means that the directory is able to successfully initialize. Especially
if it wasnt able to do so before it was rebooted.
Check if both, the NETLOGON and SYSVOL share are created. If so, the SYSVOL was
successfully published to the other domain controllers.
Check the Directory Service Event log for any messages.
Check if the domain controller is able to replicate with its neighbors.
Check if the domain controller is able to authenticate with its neighbors.
A very useful toll to verify AD replication status can be downloaded from Microsoft.
Repadmin /showbackup
Domain, Configuration and Application Partitions replication context are restorable through the
System State restore and Snap Shot restore.
Global Catalog recovery is possible by restoring the AD, but not really necessary.
Its not possible to restore the Schema Naming Context unless you destroy your entire forest and
restore one domain controller of the root domain, deletes all other domain controllers and
restage them ad additional domain controller in your restored forest.
Authoritative restore
Non-Authoritative
21/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
As with a non-authoritative restore, once a DC is back online, it contacts its replication partner(s)
to see what has changed since the last backup. But because the version number of the object(s)
restored is higher than the existing instances of those objects held on replication partner(s), the
objects on the restored DC appear to be more recent and, therefore, must be replicated out to
the rest of the DCs within the environment. (By default, version numbers are incremented by
100,000 under the authoritative restore process.)
Because of this, the authoritative restoration method is typically used when human error is
involved, such as when an administrator has accidentally deleted an OU.
An authoritative restore does not overwrite new objects created after the backup occurred. An
authoritative restore can be carried out only on objects from the configuration and domain
contexts. The authoritative restore of schema components is not supported, unless you remove
all exiting domain controllers in the forest and restore an older version.
After a non-authoritative restore, the DC is updated using normal replication techniques. That is,
if the version number of an object is less than the same objects version number stored by its
replication partner(s) (indicating the object has changed since it was last backed up), the object
on the restored server is updated. This ensures an up-to-date version of the database.
Keep in mind that when a non-authoritative restore restores an object that has been deleted in
the time between the backup and the restore, the object will be restored but deleted again by
the replication once the restored domain controller becomes online. This because the deleted
object is not physically deleted, but marked as being deleted on all remaining domain
controllers.
Be sure you know the Active Directory Restore Mode Administrator Password. If not,
please refer to: 12.2. Change the Active Directory Restore Mode (DSRM) Administrator
Password
To boot an existing domain controller, or new staged Windows 2012 server into the
Active Directory Restore Mode:
22/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Once the SystemState restore has been finished, select Y to reboot the system
Logon to the system using the DSRM account and password
Wait till the restore process has been finished.
To disable the Active Directory Restore Mode boot option, execute the following
command on the command prompt:
Be sure you know the Active Directory Restore Mode Administrator Password. If not,
please refer to: 12.3. Change the Active Directory Restore Mode (DSRM) Administrator
Password
To boot an existing domain controller, or new staged Windows 2012 server into the
Active Directory Restore Mode:
23/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Once the SystemState restore has been finished, select Y to reboot the system
Logon to the system using the DSRM account and password
Wait till the restore process has been finished.
From the command prompt, start ntdsutil and execute all of the following commands:
<Distinguished name>
The distinguished name is unambiguous (identifies one object only) and unique (no other object
in the directory has this name). By using the full path to an object, including the object name and
all parent objects to the root of the domain, the distinguished name uniquely and
unambiguously identifies an object within a domain hierarchy. It contains sufficient information
for an LDAP client to retrieve the object's information from the directory.
For example, a user named James Smith works in the marketing department of a company as a
promotions coordinator. Therefore, his user account is created in an organizational unit that
stores the accounts for marketing department employees who are engaged in promotional
activities. James Smith's user identifier is JSmith, and he works in the North American branch of
the company.
The root domain of the company is reskit.com, and the local domain is noam.reskit.com. The
diagram illustrates the components that make up the distinguished name of the user object
JSmith in the noam.reskit.com domain.
24/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Fig 3
Through LDP.exe
Through ADRestore.exe
To find tombstones:
3
Figure comes from Microsoft Technet
25/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
To reanimate tombstones:
26/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
To find tombstones:
To reanimate tombstones:
Snapshots cant be used to recover objects, you need to mount a snapshot, export your objects,
mount the NTDS instance and import your objects.
To mount snapshots:
Start, on the command prompt: ntdsutil.
First you need to mount a snapshot. Enter snapshot
Enter List All and decide up on which snapshot you want to use to recover from
Enter mount <snapshot number>
You can mount as many snapshots you want.
You should be able to find the mounted snapshot as a shortcut on the C: drive.
When you open it, you should find a full copy of your entire system. Its even
possible to copy files from the mounted snapshot.
You can leave ntdsutil
In order to connect to the AD snapshot you've mounted you will need to use the DSAMAIN
command. DSAMAIN is a command-line tool that is built into Windows Server 2012. It is
available if you have the Active Directory Domain Services or Active Directory Lightweight
Directory Services server role installed.
After using DSAMAIN to expose the information inside the AD snapshot, you can use any GUI
tool that can connect to the specified port, tools such as Active Directory Users and Computers
(DSA.msc), ADSIEDIT.msc, LDP.exe or others. You can also connect to it by using command line
tools such as LDIFDE or CSVDE, tools that allow you to export information from that database.
27/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Select Advanced
Enter the LDAP port you specified with the DSAMAIN command
Select OK, Select OK
Youre now connected to the mounted Active Directory with the content at the time
the snapshot backup took place. You can use any LDAP aware tool to connect,
browse and export the content.
To disconnect from the DSAMAIN from the database, press CTRL+C on the command
prompt where you mounted the database.
For more information related to LDIFDE and CSVDE, please refer to:
http://technet.microsoft.com/en-us/library/cc731033(WS.10).aspx
http://technet.microsoft.com/en-us/library/cc732101(WS.10).aspx
To dismount snapshots:
Start, on the command prompt: ntdsutil.
First you need to mount a snapshot. Enter snapshot
Enter List All and decide up on which snapshot you want to use to recover from
Enter unmount <snapshot number>
You can unmount version after version.
The snapshot folder on the hard drive should be disappeared.
You can leave ntdsutil
This feature is only available when the domain and forest functional level are at least on
Windows Server 2008 R2 and the recycle bin has been enabled.
28/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
You need to know the ObjectGUID of the deleted object in order to be able to recover the Active
Directory object through the recycle bin.
The Get-ADObject and Restore-ADObject are power shell commands that can be used on a
Windows 2008 domain without the recycle bin being enabled. The difference is that the deleted
objects in the domain without the recycle bin are being stripped off. After the restore, much of
their attributes are empty. Attributes are not stripped of when the recycle bin has been enabled.
Execute the following command to find all deleted objects and only list it ObjectGUID:
Get-ADObject -filter 'isdeleted -eq $true -and name
-ne "Deleted Objects"' -includeDeletedObjects -property objectGUID
To find a deleted OU :
Get-ADObject -filter isdeleted -eq $true -and msds-lastknownrdn
-eq <OU name>" and lastknowparent eq <FQDN of parent>'
-includeDeletedObjects
You can now restore the deleted object once you found the ObjectGUID of the object you want
to restore.
You can restore multiple objects at the same time. Actually, you can recover every
object or group of objects listed through one of your Get_ADObject commands, simply
by adding the outcome to the restore-ADObject as in the following examples:
29/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Your DCs are running at least Windows Server 2003 SP1, 2008, 2008 R2, 2012 and
the forest operates at least at the Windows Server 2003 Forest Functional Level.
Only users are deleted, or only groups are deleted, never both at the same time
The deleted users and groups are in the same domain
In variations of this scenario, user accounts, computer accounts, or security groups may have
been deleted individually or in some combination. In all these cases, authoritatively restore
those objects that were inadvertently deleted.
Some deleted objects require more work to be restored. These objects include objects such as
user accounts that contain attributes that are back links of the attributes of other objects. Two
of these attributes are managedBy and memberOf.
Restore the deleted user accounts, and then add the restored users back to their
groups by using Ntdsutil.exe
Restore the deleted user accounts, and then add the restored users back to their
groups using a script.
Authoritatively restore the deleted user accounts and the deleted users' security
groups two times.
ar_YYYYMMDD-HHMMSS_objects.txt
This file contains a list of the authoritatively restored objects. Use this file with the ntdsutil
authoritatative restore "create ldif file from" command in any other domain in the forest where
the user was a member of Domain Local groups.
ar_YYYYMMDD-HHMMSS_links_usn.loc.ldf
If you perform the auth restore on a global catalog, one of these files is generated for every
domain in the forest. This file contains a script that you can use with the Ldifde.exe utility. The
30/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
script restores the backlinks for the restored objects. In the user's home domain, the script
restores all the group memberships for the restored users. In all other domains in the forest
where the user has group membership, the script restores only universal and global group
memberships. The script does not restore any Domain Local group memberships. These
memberships are not tracked by a global catalog.
Type the following command to push the auth-restored objects to all the cross-site
replica domain controllers in the domain and to all the global catalogs in the forest:
Type the following command to restore the users group memberships using LDIFF:
ldifde -i -f ar_YYYYMMDD-HHMMSS_links_usn.loc.ldf
Authoritatively restore all deleted user accounts and all security groups, for more
information please refer to: 13.1.1. Authoritative Restore
Reboot the system in normal Active Directory operation mode
Wait for the end-to-end replication of the restored users and of the security groups
to all the domain controllers in the deleted user's domain and to the forest's global
catalog domain controllers.
Repeat step 1,2 and 3 once again.
If the deleted users were members of security groups in other domains,
authoritatively restore all the security groups that the deleted users were members
of in those domains. Or, if system state backups are current, authoritatively restore
all the security groups in those domains.
Cleanup AD, install a new server with the same name and perform a DCPROMO
Install a new server and restore the system state backup
31/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Using ntdsutil, remove all but the restored domain controller for the restored
domain from the domain. The goal is to end up with a domain in which only the
recovered domain controller remains for the recovered domain. When using
ntdsutil, connect to the recovered domain controller.
Keep in mind that the domain is not reachable. This means that the MMC snap in
Active Directory Users and Computers would not work. So use ADSI editor to
remove objects from the AD.
To remove a DC from Active Directory, please refer to: 12.2. Remove Domain
Controller from Active Directory
Unless you plan to use the same names as the original servers, start cleaning out
DNS for each domain controller removed from the domain. For more information,
please refer to: 12.1. Remove Domain Controller from DNS
You can now safely install a new server using the same SAMAccountName and promote it to
domain controller.
32/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Using ntdsutil, remove all but the restored domain controller for the restored
domain from the domain. The goal is to end up with a domain in which only the
recovered domain controller remains for the recovered domain. When using
ntdsutil, connect to the recovered domain controller.
Keep in mind that the domain is not reachable. This means that the MMC snap in
Active Directory Users and Computers would not work. So use ADSI editor to
remove objects from the AD.
To remove a DC from Active Directory, please refer to: 12.2. Remove Domain
Controller from Active Directory
Unless you plan to use the same names as the original servers, start cleaning out
DNS for each domain controller removed from the domain. For more information,
please refer to: 12.1. Remove Domain Controller from DNS
Add additional domain controllers through normal staging procedures using the most
recent domain controller profile.
Although the AD schema cant be restores as such, when restoring a root domain controller, the
schema will be restored in the state it was at the last backup, meaning that all schema
extensions made are restored to.
Always start from the root domain down to the child domains following the domain
hierarchy
Restore only one domain controller from each domain
33/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Clean out all other domain controllers in the restored domain, before starting the
restore of the next domain
To speed up the recovery, and to avoid all manual DNS changes, use the same IP
address and hostname as the original DC.
Using ntdsutil, remove all but the restored domain controller for each restored domain in
the forest . The goal is to end up with a domain in which only the recovered domain
controller remains for the recovered domain. When using ntdsutil, connect to the
recovered domain controller.
Keep in mind that the domain is not reachable. This means that the MMC snap in Active
Directory Users and Computers would not work. So use ADSI editor to remove objects
from the AD.
To remove a DC from Active Directory, please refer to: 12.2. Remove Domain Controller
from Active Directory
Unless you plan to use the same names as the original servers, start cleaning out DNS for
each domain controller removed from the domain. For more information, please refer to:
12.1. Remove Domain Controller from DNS
For each domain in the forest, restage a computer on equivalent hardware and
equivalent number of partitions as the original failed domain controllers.
For one domain controller of each domain in the forest, perform an authoritative System
State restore. For more information please refer to: 13.1.1. Authoritative Restore
Be sure that all domain and forest wide FSMO roles are now maintained on the recovered
on the correct domain controller. To seize the FSMO roles, refer to: 17. FSMO Roles
Recovery.
Reboot the systems
Validate the successful restore, please refer to: 12.6. Verification of a Successful Restore
For each domain in the forest, add additional domain controllers through normal staging
procedures using the most recent domain controller profile.
34/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
In Windows 2008, all domain controllers are maintaining an updatable copy of the Active
Directory. However, not all attributes or objects are updatable on every domain controller. Some
are; such as the Schema can only be updated on one single DC in the entire forest, others are
done on one single DC in each domain, whatever the number of domains there are.
To avoid some unsolvable replication conflicts if the same object was modified on two different
domain controllers at the same time, 5 different roles are maintained throughout the
infrastructure:
RID Master Domain Processes RID Pool requests from all DCs within a
given domain
Although the process required to seize an FSMO role is similar to the process used for all five
roles, the issues associated with FSMO seizure differ.
Recovering the Schema Master
The primary consideration is the permanence of the outage. Because of the chance of duplicate
schema changes being propagated throughout the environment, a seizure of the schema master
role should be carried out only if the failed role holder will never come back online.
35/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Because of the infrequent requirement for a schema master role and the implications of a
seizure, you can usually live with the outage during the period of time it takes to restore the DC
holding the role. However, if you require the immediate use of the schema master role or if the
original role holder will never be brought back into the Windows 2012 environment, a seizure
can be carried out.
Recovering the Domain Naming Master
The primary consideration is the permanence of the outage. Because of the chance of duplicate
domain naming changes being propagated throughout the environment, a seizure of the domain
naming master role should be carried out only if the failed role holder will never come back
online.
Because of the infrequent requirement for a domain naming master role and the implications of
a seizure, you can usually live with the outage during the period of time it takes to restore the
DC holding the role. However, if you require the immediate use of the domain naming master
role or if the original role holder will never be brought back into the Windows 2012
environment, a seizure can be carried out.
Recovering the RID Master
Consider carefully before you decide to perform a seizure on an RID master. Because of the risk
of duplicate RIDs on the network, the sever that originally housed the RID master role should
never come back online.
As a result, the decision to seize the PDC emulator role has fewer implications to your
environment and is generally considered a standard practice in the event of a PDC emulator
failure, particularly in a mixed mode environment.
The only real issue to consider is whether you are functioning in a mixed mode environment
with NT 4.0 BDCs. For the BDCs to be aware of the changes, a full synchronization of the BUILTIN
database with the new PDC emulator will occur.
Recovering a Global Catalog
This is not necessary when all domain controllers through the forest are Global Catalog. If not,
just enable the GC role on another remaining domain controller.
36/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Type q
Type Select Operation Target
Type List roles for connected server
37/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Its only possible to restore the content of the SYSVOL share and the NETLOGON share. If
someone deleted the entire SYSVOL directory, restore will be successful, but SYSVOL and
NETLOGON replication wont work.
Be sure you know the Active Directory Restore Mode Administrator Password. If not,
please refer to: 12.3. Change the Active Directory Restore Mode (DSRM) Administrator
Password
To boot an existing domain controller, or new staged Windows 2012 server into the
Active Directory Restore Mode:
example:
wbadmin start systemstaterecovery version:07/27/2010-09:25 quiet
authsysvol
Once the SystemState recstore has been finished, select Y to reboot the system
Logon to the system using the DSRM account and password
Wait till the restore process has been finished.
38/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
At this point, SYSVOL has been restored authoritatively through NTDS. You now have the
possibility to authoritatively restore the Active Directory as well. Skip the next step if you
dont want the restore AD.
From the command prompt, start ntdsutil and execute all of the following commands:
To disable the Active Directory Restore Mode boot option, execute the following
command on the command prompt:
As from Windows Server 2008, natively installed, SYSVOL replication will take place by meaning
of DFSR instead of FRS. You want to force the non-authoritative synchronization of SYSVOL on a
domain controller. In the File Replication Service (FRS), this was controlled through the D2 and
D4 data values for the Burflags registry values, but these values do not exist for the Distributed
File System Replication (DFSR) service. You cannot use the DFS Management snap-in
(Dfsmgmt.msc) or the Dfsradmin.exe command-line tool to achieve this. Unlike custom DFSR
replicated folders, SYSVOL is intentionally protected from any editing through its management
interfaces to prevent accidents.
In the ADSIEDIT.MSC tool modify the following distinguished name (DN) value and attribute
on each of the domain controllers that you want to make non-authoritative:
Force Active Directory replication throughout the domain. This can be accomplice by using
the following command: repadmin /syncall /e
Run the following command from an elevated command prompt on the same servers that
you set as non-authoritative: DFSRDIAG POLLAD
39/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
You will see Event ID 4114 in the DFSR event log indicating SYSVOL is no longer being
replicated.
msDFSR-Enabled=TRUE
Force Active Directory replication throughout the domain. This can be accomplice by using
the following command: repadmin /syncall /e
Run the following command from an elevated command prompt on the same servers that
you set as non-authoritative: DFSRDIAG POLLAD
You will see Event ID 4614 and 4604 in the DFSR event log indicating SYSVOL has been
initialized. That domain controller has now done a D2 of SYSVOL.
In the ADSIEDIT.MSC tool, modify the following DN and two attributes on the domain
controller you want to make authoritative (preferrably the PDC Emulator, which is usually
the most up to date for SYSVOL contents):
Modify the following DN and single attribute on all other domain controllers in that domain:
Force Active Directory replication throughout the domain. This can be accomplice by using
the following command: repadmin /syncall /e
You will see Event ID 4114 in the DFSR event log indicating SYSVOL is no longer being
replicated.
Force Active Directory replication throughout the domain. This can be accomplice by using
the following command: repadmin /syncall /e
Run the following command from an elevated command prompt on the same server that
you set as authoritative: DFSRDIAG POLLAD
You will see Event ID 4602 in the DFSR event log indicating SYSVOL has been initialized. That
domain controller has now done a D4 of SYSVOL.
40/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Start the DFSR service on the other non-authoritative DCs. You will see Event ID 4114 in the
DFSR event log indicating SYSVOL is no longer being replicated on each of them.
Modify the following DN and single attribute on all other domain controllers in that domain:
Run the following command from an elevated command prompt on all non-authoritative
DCs (i.e. all but the formerly authoritative one): DFSRDIAG POLLAD
Demote the domain controller, delete all database files and promote the computer
back to domain controller
Non-authoritative restore of the entire database from backup
Using NTDSUTIL, perform a database repair by compacting the database
NTDSUTIL can be used to compact the Active Directory database to another location followed
by a copy and overwrites of the original database file with the new compacted database file:
41/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Applies to event:
NTDS (420) NTDSA: The database page read from the file "e:\NTDS_AD\ntds.dit" at offset
1557479424 (0x000000005cd54000) for 8192 (0x00002000) bytes failed verification due to a page
checksum mismatch. The expected checksum was 2951061134 (0xafe59e8e) and the actual
checksum was 2951061135 (0xafe59e8f). The read operation will fail with error -1018 (0xfffffc06).
If this condition persists then please restore the database from a previous backup. This problem is
likely due to faulty hardware. Please contact your hardware vendor for further assistance diagnosing
the problem.
Select the Group Policy Objects container within the Group Policy Management
console
Right-click and choose Manage Backups
Browse to the folder that contains all GPO backups for that domain
Select one or more GPOs to restore
Click on Restore within the Manage Backups dialog box.
For each restored GPO, open the report file (.html) from the backup folder and
recreate the reported links when needed.
42/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
The KCC service running on each domain controller recalculates and rebuilds the entire
replication topology every 15 minutes, if necessary. The replication topology will be dynamically
changed should one or more domain controllers, site links or entire sites become unavailable.
This makes ADS less vulnerable to network issues or Domain Controller hardware issues.
4
Definition comes from Wikipedia: http://en.wikipedia.org/wiki/Recovery_Time_Objective
43/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
The RTO and the results of the Business Impact Analysis (BIA) in its entirety provide the basis for
identifying and analysing viable strategies for inclusion in the business continuity plan. Viable
strategy options would include any which would enable resumption of a business process in a
time frame at or near the RTO. This would include alternate or manual workaround procedures
and would not necessarily require computer systems to meet the RTOs.
The "O" in RTO stands for objective, not mandate. In reality, strategy is often selected that will
not meet the RTO. In this instance the RTO will not be met but should still remain an objective of
future strategy revision.
RPO Defined 5
The Recovery Point Objective (RPO) is the point in time to which you must recover data as
defined by your organization. This is generally a definition of what an organization determines is
an "acceptable loss" in a disaster situation. If the RPO of a company is 2 hours and the time it
takes to get the data back into production is 5 hours, the RPO is still 2 hours.
Example: If there is a complete replication at 10:00 am and the system dies at 11:59 am without
a new replication, the loss of the data written between 10:00 am and 11:59 am will not be
recovered from the replica. This amount of time data has been lost has been deemed acceptable
because of the 2 hour RPO. This is the case even if it takes an additional 3 hours to get the site
back into production (although these three hours may form part of the Recovery Time
Objective). The production will continue from the point in time of 10:00 am. All data in between
will have to be manually recovered through other means.
When one more sites are down. A site, from and Active Directory point of view is
not the same a physical building our site. A site in ADS is a collection of networks in
which all servers are fully connected to each other through fast network links.
When the site outage will be longer than 8 hours.
The remaining domain controllers will be much more called by clients and users for
authentication and authorization operations. This will slow down the reaction time
of these domain controllers.
ADS have 5 different FSMO roles, which are unique through the domain or the
forest. It would be possible that some of these roles become unavailable since they
are on the failing site.
5
Definition comes from Wikipedia: http://en.wikipedia.org/wiki/Recovery_point_objective
44/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
Shutdown all domain controllers on the remaining site (if she still exists)
The DNS team should, for each domain controller on the failing site:
Remove the A and PTR record for the server name from the DNS
Remove the A record for the domain for the server from the DNS
Remove all SRV records for the server from the DNS
Be sure all domain controllers have the necessary rights to update and or create
their SRV records in the DNS. Be sure the A and the PTR record for the servers exists
and that their A record also exist on the domain record.
Power on all domain controllers which did not have any FSMO role before the DRP
started.
Verify if, after the boot, all necessary SRV records for each server exists. To do, log
onto the server and launch the CheckDNS.exe tool.
Ask the DNS people to force a full regeneration of all zones and force a full
replication to each secondary DNS server.
Reinstall all domain controllers which maintained a FSMO role before the DRP
started.
Verify if, after the boot, all necessary SRV records for the reinstalled server exists. To
do, log onto the server and launch the CheckDNS.exe tool.
Ask the DNS people to force a full regeneration of all zones and force a full
replication to each secondary DNS server.
Move all FSMO roles to their original server. For more information, please refer to:
17.4. How to Move a Role
45/46
Windows Server 2012 AD Backup and Disaster Recovery Procedures
More information about restoring deleted objects using ADRestore can be found @:
http://support.microsoft.com/?kbid=840001
46/46