Platform SDK: Active Directory, ADSI, and Directory Services |
Active Directory must be restored offline. The system must be rebooted in Directory Services Restore mode. In this mode, the operating system is running without Active Directory and all user validation occurs through the Security Accounts Manager (SAM) in the registry. To restore Active Directory, you must be a local administrator on the DC being restored.
The caller of the restore functions must have the SE_RESTORE_NAME privilege. You can use the DsSetAuthIdentity function to set the security context under which the directory backup/restore functions are called.
Note that when you restore Active Directory, you must also restore the other system state components.
To restore Active Directory from backups
After a restore in Directory Services Restore mode, the domain controller should be rebooted in normal mode. When the directory service starts, the domain controller will perform the normal consistency check and the restored directory will then be online.
Note that "restoring" an Active Directory is always a two-part operation. Part one is to restore the database up to the point in time when the backup was taken and not beyond. Part two is to replicate the directory, where the newly restored DSA replicates post-backup updates from other DSAs in the domain/enterprise.
Any Windows 2000® server that contains a replica of the Windows 2000® directory service is a domain controller (DC).
The DsRestoreRegister function adds a "Restore In Progress" key to the registry. If you commit the system hive of the registry after calling DsRestoreRegister, you need to move this key from the running hive to the restored hive. You can avoid this step by committing the system hive just before calling the DsRestore functions.