The ADAM database is the heart and soul of your Horizon View environment. It contains all sorts of great stuff from Pool inventory, to persistent disk assignment, to licensing information. Long story short, if you lose your ADAM database, you straight up lose. Be a winner and backup your database!
Did you know?
View is smart enough to backup its own database. If you jump onto one of your Connection Servers and navigate to C:\ProgramData\VMware\VDM\backups you should see a slew of .LDF files.
These are your automated backups. You can see when your last backup ran by launching the Horizon View Administration page and navigating to View Configuration > Servers > Connection Servers and looking at the Last Backup column.
Like any good admin, you take your own backups
You don’t want to rely only on these backups. They are local to the Connection Server after all, causing a single point of failure if you lose that VM for any reason. You can always copy the latest LDF to another server somewhere, or you can take a manual backup of the current state of the ADAM database. This is extremely simple and highly recommended!
NOTE: You’ll also want to know what your data recovery password is before you can restore any backup you have. If you don’t know what it is, you can change it by launching View Administrator > View Configuration > Global Settings > Security > Change data security password
Taking a manual backup of the ADAM database
Before we take the backup, you might be asking, “Do I need to take a backup of all my replica Connection Servers’ databases?” The short answer is no, you need only take one backup. This is due to how the restore procedure is carried out (outlined below).
- First off, ensure your View environment isn’t currently creating or deleting any VMs and disable all pools from provisioning
- Now get a console to your Connection Server
- Launch an elevated Windows Command Prompt
- Navigate to the directory you want the backup to reside temporarily and run
vdmexport > vdmconfig.ldf
- This created an LDF file on my desktop. You can compare its size to that of your automated backups (they should be similar)
- Let’s move this LDF to a backup file share for safe keeping and you’ve got yourself a current ADAM database backup!
It should be noted that in the event of an actual outage that requires a restore of the ADAM database, best practice is to also restore the Composer and vCenter databases from the same time frame of the ADAM backup. Otherwise the VM inventory of the databases could be out of sync causing orphaned VMs and other missing data that could take additional downtime to recover from. The backup and restore of Composer and vCenter are generally quite simple as they follow simple SQL backup and restore procedures. It goes without saying, however, that whatever database you’re using, refer to that database vendor for proper backup/restore procedures.
Restoring an ADAM database LDF backup
When it comes time to restore the ADAM database (preferably after Composer and vCenter databases have been restored) the simplest way to get View back up is to reinstall the Connection Server service.
- Uninstall the VMware Horizon View Connection Server software (from Add-Remove Programs / Programs and Features / appwiz.cpl / etc)
- Uninstall the AD LDS Instance VMwareVDMDS software (This is the ADAM instance which gets installed with View)
- Remove the ADLDS Role from Server Configuration
- Reboot the server
- Install the Connection Server software
- Be sure to choose Standard Server during install
- If you have replicas in the environment, we’ll deal with those later.
- Decrypt the LDF backup you took earlier by launching command prompt and typing
vdmimport -d -f MyEncryptedexport.LDF > MyDecryptedexport.LDF
- This will prompt you to enter your data recovery password.
- Now you can import the database into the fresh ADAM instance by typing
vdmimport -f VDMConfig.LDF
- If this is your only Connection Server, you’ve successfully completed the database restore and View should be fully operational. If you have any replicas in the environment, these servers will need to be re-installed as replicas. Follow the same uninstall process from steps 1 – 4 and ensure you choose Replica during install.
For more information, check out VMware’s KB for performing an end-to-end backup.