Restore AD LDS Instance Data
Applies To: Windows Server 2008
To restore your Active Directory Lightweight Directory Services (AD LDS) instance data, select a procedure that is most appropriate for your AD LDS restore scenario:
Restore an existing AD LDS instance
Restore a retired AD LDS instance
Authoritatively restore an AD LDS instance
Install an AD LDS replica from media
Restore an existing AD LDS instance
You can restore an existing AD LDS instance to its state at the time when its backup was created. When you restore a database for an existing AD LDS instance, you must stop the AD LDS instance before you run the restore operation. In addition, we recommend that you move (or delete) the existing database and log files from the AD LDS instance before you begin the restore operation.
If you restore an AD LDS backup over a running AD LDS instance, Windows Server Backup leaves the restored files in a pending state, and it does not write the files to disk until the computer reboots. In this situation, any directory changes that are made to the running AD LDS instance after Windows Server Backup is run are lost.
Membership in Administrators, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (https://go.microsoft.com/fwlink/?LinkId=83477).
To restore an existing AD LDS instance
Stop the AD LDS instance that you just created, as follows:
Click Start, point to Administrative Tools, and then click Services.
In Services, right-click the AD LDS instance, and then click Stop.
Note
If you accidentally start a restore of an AD LDS instance over a currently running AD LDS instance, we recommend that you immediately restart the computer, stop the AD LDS instance, and then perform the restoration again.
Click Start, click Administrative Tools, and then click Windows ServerBackup.
On the Action menu, click Recover.
Follow the steps in the Recovery Wizard to specify the location of the source backup data and identify the specific backup from which you want to recover instance data.
In Select recovery type, click Files and folders, and then click Next.
In Select items to recover, browse to and select the folder that contains the instance data files. By default, AD LDS database and log files are located in %ProgramFiles%\Microsoft ADAM\instance_name\data*,* where instance_name is the AD LDS instance name.
In Specify recovery options, click Original location and Overwrite existing files with recovered files, and then click Next.
To complete the restore, click Recover.
After the restore is complete, close Windows ServerBackup.
Start the AD LDS instance as follows:
Click Start, point to Administrative Tools, and then click Services.
In Services, right-click the AD LDS instance, and then click Start.
Note
You cannot use Windows Server Backup to restore an existing AD LDS instance with a backup that was created with the Dsdbutil.exe tool. To restore your existing AD LDS instance with a backup that was created with Dsdbutil.exe, see Appendix B: Restore an AD LDS Instance with a Backup Taken with Dsdbutil.exe.
Restore a retired AD LDS instance
To restore a retired AD LDS instance (or to move a specific AD LDS instance from one server to another), you must begin the recovery process by creating a new AD LDS instance using the same settings that were specified during the installation of the AD LDS instance that you want to recover or move.
Membership in Administrators, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (https://go.microsoft.com/fwlink/?LinkId=83477).
To restore a retired AD LDS instance
By using the Active Directory Lightweight Directory Services Setup Wizard, create an AD LDS instance, specifying the same settings that you used during your original (uninstalled) AD LDS installation. However, do not create an application directory partition during setup. For more information about creating AD LDS instances, see the Step-by-Step Guide for Getting Started with Active Directory Lightweight Directory Services (https://go.microsoft.com/fwlink/?LinkId=98679).
Stop the AD LDS instance that you just created, as follows:
Click Start, point to Administrative Tools, and then click Services.
In Services, right-click the AD LDS instance, and then click Stop.
Note
If you accidentally start a restore of an AD LDS instance over a currently running AD LDS instance, we recommend that you immediately restart the computer, stop the AD LDS instance, and then perform the restoration again.
Click Start, click Administrative Tools, and then click Windows ServerBackup.
On the Action menu, click Recover.
Follow the steps in the Recovery Wizard to specify the location of the source backup data and identify the specific backup from which you want to recover instance data.
In Select recovery type, click Files and folders, and then click Next.
In Select items to recover, browse to and select the folder that contains the instance data files. By default, AD LDS database and log files are located in %ProgramFiles%\Microsoft ADAM\instance_name\data*,* where instance_name is the AD LDS instance name.
In Specify recovery options, click Original locations and Overwrite existing files with recovered files, and then click Next.
To complete the restore, click Recover.
After the restore is complete, close Windows Server Backup.
Start the AD LDS instance that you just created, as follows:
Click Start, click Administrative Tools, and then click Services.
In Services, right-click the AD LDS instance, and then click Start.
Note
You cannot use Windows Server Backup to restore a retired AD LDS instance with a backup that was created with Dsdbutil.exe. To restore your existing AD LDS instance with a backup that was created with Dsdbutil.exe, see Appendix B: Restore an AD LDS Instance with a Backup Taken with Dsdbutil.exe.
Authoritatively restore an AD LDS instance
If objects in the directory are inadvertently deleted or modified, and if those objects are replicated in a configuration set, you must authoritatively restore those objects so that the correct version of the objects is replicated.
To authoritatively restore directory data, run the dsdbutil tool after you restore the data but before you restart the AD LDS instance. With dsdbutil, you can mark directory objects for authoritative restore. When an object is marked for authoritative restore, its update sequence number is changed so that the number is higher than any other update sequence number in the configuration set. This ensures that any data you restore is properly replicated throughout the configuration set.
Membership in Administrators, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (https://go.microsoft.com/fwlink/?LinkId=83477).
To authoritatively restore an AD LDS instance
If it is running, stop the AD LDS instance for which data will be restored.
Click Start, point to Administrative Tools, and then click Services.
In Services, right-click the AD LDS instance, and then click Stop.
Note
If you accidentally start a restore of an AD LDS instance over a currently running AD LDS instance, we recommend that you immediately restart the computer, stop the AD LDS instance, and then perform the restoration again.
Click Start, click Administrative Tools, and then click Windows ServerBackup.
On the Action menu, click Recover.
Follow the steps in the Recovery Wizard to specify the location of the source backup data and to identify the specific backup from which you want to recover instance data.
In Select recovery type, click Files and folders, and then click Next.
In Select items to recover, browse to and select the folder that contains the instance data files. By default, AD LDS database and log files are located in %ProgramFiles%\Microsoft ADAM\instance_name\data*,* where instance_name is the AD LDS instance name.
In Specify recovery options, click Original locations and Overwrite existing files with recovered files, and then click Next.
To complete the restore, click Recover.
After the restore is complete, close Windows Server Backup.
Click Start, right-click Command Prompt, and then click Run as administrator.
At the command prompt, type the following command, and then press ENTER:
dsdbutil
At the dsdbutil: prompt, type the following command, and then press ENTER:
activate instance <instance_name>
where <instance_name*>* represents the service name of the AD LDS instance on which you want to restore data.
At the dsdbutil: prompt, type the following command, and then press ENTER:
authoritative restore
At the authoritative restore: prompt, type one of the commands in the following table.
Command Description restore object dn
Performs authoritative restore of the directory object whose distinguished name is represented by dn.
restore subtree dn
Performs authoritative restore of the directory subtree whose distinguished name is represented by dn.
To view the complete syntax for this command, and for information about the authoritative restore command in dsdbutil, at the authoritative restore: prompt, type:
?
To exit dsdbutil:
At the authoritative restore: prompt, type quit, and then press ENTER.
At the dsdbutil: prompt, type quit, and then press ENTER.
Start the AD LDS instance as follows:
Click Start, click Administrative Tools, and then click Services.
In Services, right-click the AD LDS instance, and then click Start.
Note
You cannot use Windows Server Backup to restore an AD LDS instance with a backup that was created with Dsdbutil.exe. To restore your existing AD LDS instance with a backup that was created with Dsdbutil.exe, see Appendix B: Restore an AD LDS Instance with a Backup Taken with Dsdbutil.exe.
Install an AD LDS replica from media
When you install an AD LDS replica from media, you restore a backup of another AD LDS instance from the same configuration set, rather than performing a simple AD LDS replica installation.
Membership in Administrators, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (https://go.microsoft.com/fwlink/?LinkId=83477).
Note
If Dsdbutil.exe was used to create the installation media (backup) of your AD LDS instance data, skip steps 1 through 7 and begin this procedure with step 8.
To install an AD LDS replica from media
Click Start, point to Administrative Tools, and then click Windows ServerBackup.
On the Action menu, click Recover.
Follow the steps in the Recovery Wizard to specify the location of the source backup data and identify the specific backup from which you want to recover instance data.
In Select recovery type, click Files and folders, and then click Next.
In Select items to recover, browse to and select the folder that contains the instance data files. By default, AD LDS database and log files are located in %ProgramFiles%\Microsoft ADAM\instance_name\data where instance_name is the AD LDS instance name.
In Specify recovery options, click Another location, specify a temporary location for the recovered files, and then click Next.
To complete the restore, click Recover.
At a command prompt, type the following command, and then press ENTER:
%windir%\adam\adaminstall /adv
Follow the steps in the Active Directory Lightweight Directory Services Setup Wizard:
On the Select Options page, click A replica of an existing instance, and then click Next.
On the Joining a Configuration Set page, type the host name or Domain Name System (DNS) name of the computer where one of the remaining AD LDS instances of the configuration set is installed. Then, type the Lightweight Directory Access Protocol (LDAP) port number in use by that AD LDS instance, and then click Next.
On the Administrative Credentials for the Configuration Set page, click the account that is used as the AD LDS administrator for your first AD LDS instance.
On the Copying Application Information page, select From the restored backup files in these folders, specify the correct location of the installation media files in the Restored data folder field, leave the Restored data recovery folder field empty, and then click Next.
On the Copy Application Partition page, select the application directory partitions that you want to replicate to the new AD LDS instance.
Accept the default values on the remaining Active Directory Lightweight Directory Services Setup Wizard pages by clicking Next on each page, and then click Finish on the Completing the Active Directory Lightweight Directory Services Setup Wizard page.
Important
You can also use this procedure to restore a retired AD LDS replica from media. However, we recommend that you first perform a metadata cleanup of any retired AD LDS replica that you plan to restore from media. For more information about metadata cleanup, see Appendix A: Metadata Cleanup for the Retired AD LDS Instances.