How to backup and restore the Horizon 6 View ADAM database

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.

Screen Shot 2015-08-10 at 8.37.56 PM

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

Screen Shot 2015-08-11 at 7.49.29 AM

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

  1. First off, ensure your View environment isn’t currently creating or deleting any VMs and disable all pools from provisioning
    1. Launch View Administrator and navigate to View Configuration > Servers > vCenter Server
    2. Click Disable Provisioning
      Screen Shot 2015-08-10 at 9.39.25 PM
  2. Now get a console to your Connection Server
  3. Launch an elevated Windows Command Prompt
  4. Navigate to the directory you want the backup to reside temporarily and run
    vdmexport > vdmconfig.ldf

    Screen Shot 2015-08-10 at 9.44.05 PM

  5. This created an LDF file on my desktop. You can compare its size to that of your automated backups (they should be similar)
    Screen Shot 2015-08-10 at 9.46.31 PM
  6. 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.

  1. Uninstall the VMware Horizon View Connection Server software (from Add-Remove Programs / Programs and Features / appwiz.cpl / etc)
  2. Uninstall the AD LDS Instance VMwareVDMDS software (This is the ADAM instance which gets installed with View)
    Screen Shot 2015-08-11 at 7.39.00 AM
  3. Remove the ADLDS Role from Server Configuration
    Screen Shot 2015-08-11 at 7.54.56 AM
  4. Reboot the server
  5. Install the Connection Server software
    1. Be sure to choose Standard Server during install
    2. If you have replicas in the environment, we’ll deal with those later.
  6. Decrypt the LDF backup you took earlier by launching command prompt and typing
     vdmimport -d -f MyEncryptedexport.LDF > MyDecryptedexport.LDF
  7. This will prompt you to enter your data recovery password.
  8. Now you can import the database into the fresh ADAM instance by typing
     vdmimport -f VDMConfig.LDF
  9. 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.

Advertisements

2 thoughts on “How to backup and restore the Horizon 6 View ADAM database

Thanks for your comments!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s