Manually Backup VMWare ADAM vCenter instance data

Original VMware Knowledge Base article : Manually backing up and restoring the vCenter Server 4.x and 5.x ADAM instance data (1029864)

Manually backing up and restoring the vCenter Server 4.x and 5.x ADAM instance data (1029864)

Purpose

vCenter Server uses ADAM (Active Directory Application Mode) database to store information related to licensing, custom roles, and Linked Mode configuration. This data is regularly backed up to the vCenter Server database in the VPX_BINARY_DATA table. If the ADAM data is corrupted, an automatic restore from this backup is performed. In certain circumstances, such as before making large configuration changes, you may want to manually backup this information to ensure that a restore can be completed quickly and efficiently.
 
This article provides the steps to manually backup and restore the vCenter Server ADAM instance information.

Resolution

To manually backup the vCenter Server ADAM database on Microsoft Windows 2008 using dsdbutil:
 
Note: If you initiated custom LDAP operations, run jointool backup--ldifOnly prior to making changes. This command backs up the current LDAP state to a .ldif or .cfg file on the current directory. The output of the backup command also lists the files used to backup, and the syntax to load the backup data into LDAP. The files backed up are instance.cfg ( \instance.cfg) and instance.ldif ( \instance.ldif). To load the backed up data into ldap, run the command: jointool recover --ldifOnly --instanceCfg --instanceLdif
 
  1. Click Start, right-click Command Prompt, then click Run as administrator to open a command prompt.
  2. Run the command:
dsdbutil
  1. At the dsdbutil: prompt, run the command:
activate instance VMwareVCMSDS
  1. Run this command to open the ifm prompt:
ifm
  1. At the ifm: prompt, run this command for the type of installation media that you want to create:

create full location

Where location is the folder path where you want to create the installation media. You can save the installation media to a network shared folder or to any other type of removable media.
 
For example:
 
create full C:\Backup\VMwareVCMSDS
 
You see output similar to:

ifm: create full C:\Backup\VMwareVCMSDS
Creating snapshot...
Snapshot set {93758b0e-0b5f-4969-a3ae-c3672b659e08} generated successfully.
Snapshot {d3257ca1-cb91-4535-82c0-8aa38bc0b566} mounted as C:\$SNAP_201010251019 _VOLUMEC$\
Initiating DEFRAGMENTATION mode...
Source Database: C:\$SNAP_201010251019_VOLUMEC$\Program Files\VMware\Infras tructure\VirtualCenter Server\VMwareVCMSDS\adamntds.dit
Target Database: c:\Backup\VMwareVCMSDS\adamntds.dit
 
Defragmentation Status (% complete)

0 1020 30 40 50 60 70 80 90 100

|----|----|----|----|----|----|----|----|----|----|

...................................................
 

Snapshot {d3257ca1-cb91-4535-82c0-8aa38bc0b566} unmounted.

IFM media created successfully in C:\Backup\VMwareVCMSDS
  1. Exit dsdbutil:
    1. At the ifm: prompt, type quit, then press Enter.
    2. At the dsdbutil: prompt, type quit, then press Enter.
To restore the vCenter Server ADAM data that was backed up using dsdbutil:
 
  1. Stop these services in this order:
  • VMware VirtualCenter Management Webservices
  • VMware VirtualCenter Server
  • VMwareVCMSDS
  1. Backup the files in the folder that contains the instance data files to an alternate location. By default, the database and log files are located at %ProgramFiles%\VMware\Infrastructure\VirtualCenter Server\VMwareVCMSDS.

    Note: In Windows 2008/2008 R2, the default path is: C:\%ProgramData%\VMware\VMware VirtualCenter\VMwareVCMSDS.

     
  2. Run this command to copy the ADAM backup that was created using dsdbutil.exe to the folder that contained the original ADAM database and log files:

    Note: In vSphere 5.0 and previous versions, the VMwareVCMSDS folder is located:
xcopy /os location\adamntds.dit "%ProgramFiles%\VMware\Infrastructure\VirtualCenter Server\VMwareVCMSDS"

Note: In vSphere 5.1, the VMwareVCMSDS folder is located:

xcopy /oslocation\adamntds.dit "%ProgramData%\VMware\VMware VirtualCenter\VMwareVCMSDS"

Where location is the folder path within which the installation media was created. For example:

xcopy /os C:\Backup\VMwareVCMSDS\adamntds.dit "c:\Program Files\VMware\Infrastructure\VirtualCenter Server\VMwareVCMSDS"
  1. Start these services in this order:
  • VMware VirtualCenter Server
  • VMwareVCMSDS
  • VMware VirtualCenter Management Webservices
To manually backup the vCenter Server ADAM database on Microsoft Windows 2003, see these Microsoft TechNet articles:

Note: The preceding links were correct as of July 15, 2013. If you find these links are broken, provide feedback and a VMware employee will update the links.