The AD Directory Information Tree (DIT) is implemented as a transactional database using the Extensible Storage Engine (ESE). The primary database file is named ntds.dit and is stored in the %SystemRoot%NTDS folder by default, but it can be relocated during the initial promotion process or manually via ntdsutil (see Moving the DIT Files for more details).
Each database write transaction is initially stored in a logfile named edb.log, which is stored in the same directory as ntds.dit by default, though you can modify this either during or after the initial promotion process. That logfile can grow to 10 MB in size, after which additional logfiles are created (e.g., edb00001.log), each of which can also grow to up to 10 MB in size. After the transactions in the logfiles are committed to the database, the logfiles are purged, beginning with the log containing the oldest transactions. This process is referred to as circular logging. These logfiles are useful when a domain controller is shut down unexpectedly because when the DC comes back online, Active Directory can replay the logfiles and apply any transactions that might not have been written to disk before the DC shut down. The edb.chk file stores information about the last transaction that was actually committed to the database; AD uses this information to determine which transactions in the logfiles still need to be committed. Finally, two 10 MB files called edbres00001.jrs and edbres00002.jrs are used as placeholders in case the disk runs out of space; if this happens, these files are deleted to free up enough space to allow Active Directory to commit any final changes before the DC is shut down.
In order to recover portions of Active Directory, or the entire directory itself, you need to have a solid backup strategy in place. You can back up Active Directory while it is online, which means you do not need to worry about scheduling regular downtime simply to perform backups. Restoring Active Directory is also a relatively simple process. You can restore a single object, an entire subtree, or the entire database if necessary. For a detailed discussion on backing up and restoring Active Directory, see Active Directory, Fifth Edition, by Brian Desmond et al. (O’Reilly).
You also need to be familiar with how deleted objects are treated in
Active Directory, which can affect your backup procedures. By default, the
Active Directory Recycle Bin is not enabled. When the Active Directory
Recycle Bin is not enabled and an object is requested to be deleted, it is
actually marked as a tombstone and moved to the Deleted Objects
container. This
tombstone object has most of the original object’s
attribute values removed to save space in the NTDS.DIT file. These objects are stored in the
cn=Deleted Objects
container in the
naming context that the original object was located in. The deleted object
is named using the following format:
<OrigName>