The procedure that you follow to restore an Active Directory Lightweight Directory Services (AD LDS) instance depends on whether the instance already exists and whether it belongs to a configuration set:

Restoring AD LDS data on an existing AD LDS instance that belongs to a configuration set

Membership in the Administrators group, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at http://go.microsoft.com/fwlink/?LinkId=83477.

To authoritatively restore AD LDS data on an AD LDS instance that belongs to a configuration set
  1. If it is running, stop the AD LDS instance for which data will be restored.

  2. Open Backup.

  3. On the Action menu, click Recover.

  4. 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.

  5. In Click Select recovery type, click Files and folders, and then click Next.

  6. 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\instancename, where instancename is the AD LDS instance name.

  7. In Specify recovery options, click Original locations and Overwrite existing files with recovered files, and then click Next.

  8. To complete the restore, click Finish.

  9. After the restore is complete, close Backup.

  10. Open a command prompt.

  11. At the command prompt, type the following command, and then press ENTER:

    dsdbutil

  12. At the dsdbutil: prompt, type the following command, and then press ENTER:

    activate instance instancename

    where instancename represents the service name of the AD LDS instance on which you want to restore data.

  13. At the dsdbutil: prompt, type the following command, and then press ENTER:

    authoritative restore

  14. At the authoritative restore: prompt, type one of the commands in the following table.

    Command Description

    restore database

    Performs authoritative restore of the entire directory database.

    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.

Additional considerations

  • To open Backup, click Start, click Administrative Tools, and then click Backup.

  • To open a command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

  • Use the Services snap-in to stop an AD LDS instance.

  • You can use this procedure if you want the data being restored to authoritatively override existing data in the configuration set.

  • For more information about the authoritative restore command in dsdbutil, at the authoritative restore: prompt, type ?, and then press ENTER.

  • 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.

Restoring a corrupted database that is preventing an existing AD LDS instance from starting

Membership in the Administrators group, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at http://go.microsoft.com/fwlink/?LinkId=83477.

To restore a corrupted database that is preventing the existing AD LDS instance from starting
  1. If it is running, stop the AD LDS instance for which data will be restored.

  2. Open Backup.

  3. On the Action menu, click Recover.

  4. Follow the wizard steps to specify the location of the source backup data and to identify the specific backup from which you want to recover instance data.

  5. In Select recovery type, click Files and folders, and then click Next.

  6. 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\instancename, where instancename equals the AD LDS instance name.

  7. In Specify recovery options, click Original locations and Overwrite existing files with recovered files, and then click Next.

  8. To complete the restore, click Finish.

  9. After the restore is complete, close Backup.

  10. Restart the AD LDS instance.

Additional considerations

  • Use the Services snap-in to stop and start an AD LDS instance.

  • To open Backup, click Start, click Administrative Tools, and then click Backup.

  • If the AD LDS instance fails to start after you perform this procedure, perform the appropriate procedure for completely restoring an AD LDS instance, depending on whether your AD LDS instance belongs to a configuration set or is unique.

  • 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.

Restoring an AD LDS instance that does not belong to a configuration set

Membership in the Administrators group, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at http://go.microsoft.com/fwlink/?LinkId=83477.

To completely restore an AD LDS instance that does not belong to a configuration set
  1. Using the Active Directory Lightweight Directory Services Setup Wizard, create an AD LDS instance, specifying the same settings that you used during your original AD LDS installation. However, do not create an application directory partition during setup.

  2. Stop the AD LDS instance that you just created, as follows:

    1. Click Start, click Administrative Tools, and then click Services.

    2. In Services, right-click the AD LDS instance, and then click Stop.

  3. Open Backup.

  4. On the Action menu, click Recover.

  5. 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.

  6. In Select recovery type, click Files and folders, and then click Next.

  7. 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\instancename, where instancename is the AD LDS instance name.

  8. In Specify recovery options, click Original locations and Overwrite existing files with recovered files, and then click Next.

  9. To complete the restore, click Finish.

  10. After the restore is complete, close Backup.

  11. Start the AD LDS instance that you just created, as follows:

    1. Click Start, click Administrative Tools, and then click Services.

    2. In Services, right-click the AD LDS instance, and then click Start.

Additional considerations

  • To open Backup, click Start, click Administrative Tools, and then click Backup.

  • 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.

Restoring an AD LDS instance that belongs to a configuration set

Membership in the Administrators group, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at http://go.microsoft.com/fwlink/?LinkId=83477.

To completely restore an AD LDS instance that belongs to a configuration set
  1. On one of the remaining AD LDS instances in the configuration set, delete the server object representing the AD LDS instance that you want to restore, as follows:

    1. Open a command prompt.

    2. At the command prompt, type dsmgmt, and then press ENTER.

    3. At the dsmgmt: prompt, type metadata cleanup, and then press ENTER.

    4. At the metadata cleanup: prompt, type select operation target, and then press ENTER.

    5. At the select operation target: prompt, type connections, and then press ENTER.

    6. At the server connections: prompt, type the following command, and then press ENTER:

      connect to server computername:portnumber

      where computername:portnumber represents the AD LDS instance to which you are connecting.

    7. At the server connections: prompt, type q, and then press ENTER.

    8. At the select operation target: prompt, type list sites, and then press ENTER. Identify the number corresponding to the site in which the server object that you want to delete resides.

    9. At the select operation target: prompt, type select site n, and then press ENTER, where n represents the number identified in the previous step.

    10. At the select operation target: prompt, type list naming contexts, and then press ENTER. Identify the number that corresponds to a naming context previously held by the server whose server object you want to delete.

    11. Type select naming context n, and then press ENTER, where n represents the number identified in the previous step.

    12. Type list servers in site, and then press ENTER. Identify the number that is associated with the server whose server object you want to delete.

    13. Type select server n, and then press ENTER, where n represents the number identified in the previous step.

    14. At the select operation target: prompt, type q, and then press ENTER.

    15. At the metadata cleanup: prompt, type remove selected server, and then press ENTER. Click yes to confirm the deletion of the server object.

    16. In addition, you must delete the server object from the sites container:

      CN=Servers,CN=sitename,CN=Sites,CN=Configuration,CN={GUID}

      where sitename represents the name of the site in which the server object exists, and GUID represents the globally unique identifier (GUID) of the AD LDS instance.

  2. Open Backup.

  3. On the Action menu, click Recover.

  4. 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.

  5. In Select recovery type, click Files and folders, and then click Next.

  6. In Select items to recover, browse to and select the folder containing the instance data files. By default, AD LDS database and log files are located in %ProgramFiles%\Microsoft ADAM\instancename where instancename is the AD LDS instance name.

  7. In Specify recovery options, click Alternate location, specify a temporary location for the recovered files, and then click Next.

  8. To complete the restore, click Finish.

  9. At a command prompt, type the following command, and then press ENTER:

    %windir%\adam\adaminstall /adv

  10. Follow the steps in the Active Directory Lightweight Directory Services Setup Wizard.

Additional considerations

  • To open Backup, click Start, click Administrative Tools, and then click Backup.

  • To open a command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

  • For help with dsmgmt, at a dsmgmt prompt, type ?, and then press ENTER.

  • 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.

Additional references