Ever wondered how to backup the SSO “Database” in vSphere 5.5? Read on!

Backup VMDIR

You can use the vdcbackup utility to facilitate this task. vdcbackup is located by default in the vmdir installation folder (C:\Program Files\VMware\Infrastructure\VMware\CIS\vmdir) or (/usr/lib/vmware-vmdir/bin).
It is executed by running the command with a path to the database, followed by a path to the target location. This command should be run with administrator privileges.
Windows Example:
1 C:\> mkdir c:\vmdirbackup\C:\> cd "C:\Program Files\VMware\Infrastructure\VMware\CIS\vmdird"C:\...\vmdird> vdcbackup.exe  C:\ProgramData\VMware\CIS\data\vmdird\ c:\vmdirbackup\

VCSA Example:


1# mkdir /vmdirbackup/# /usr/lib/vmware-vmdir/bin/vdcbackup /storage/db/vmware-vmdir /vmdirbackup/

Note: This tool essentially does the following:
1. Marks the vmdir service as READ ONLY
2. Then uses a standard DOS or Linux “copy” commands to copy data.mdb, and lock.mdb into the destination location.
3. Returns the vmdir service to READ/WRITE status.

vTip: The target folder must exist prior to using this utility, and also you should ensure the trailing appropriate slash is present. Failure to do both of these things will result in an invalid backup.

Restoring VMDIR


Use the “restore” feature in vmdird.exe to restore a backed up database should the need arise.

In order to restore a previously backed up copy of the vmdir database:
1. Stop the VMware Directory Services service.
2. Copy the backup DB files (data.mdb, lock.mdb) to the VMware Directory Services folder
3. Start vmdir in restore mode:




1vmdird –c –m restore

4. Optionally: start vmdir in standalone mode to review the data.



2vmdird –m standalone

5. Start the VMware Directory Services service normally.

vTip: Make sure to start the vmdir service in standalone mode afterwards, otherwise you risk bad data being replicated to other nodes.

vTip: This vmdir database contains hostname elements. Do not use this backup/restore method to migrate the SSO database to a new machine.