VCAP-DTA – Objective 2.4 – Backup and Restore View Environment
Now to a key exam objective in my opinion. Like any application, a backup is only as effective as it’s restoral, if that makes sense. Or in other words, if you back something up but don’t know how to put it back under a disaster recovery situation, then your backup is about as useful as an ashtray on a motorbike.
The blueprint cites the administration guide, the View Administrator console and vdmexport.exe as the key touchpoints for this objective, so without further ado, let’s get into the skills and abilities tested :-
- Backup the View Composer database – This is just a general bullet point and is non specific about how to backup View components. There are basically two ways – via View Administrator and via command line using vdmexport.exe. Either way, you can get backups of both View Manager and View Composer data.
- Backup LDIF or SVI using View Administrator –
- To backup immediately from View Administrator, go to View Configuration, Servers, Connection Servers, select a Connection Server (remember the ADAM database is replicated) and select Backup Now. If the exam asks you to set a custom schedule on the automatic backup, go to Edit, select the Backup tab and choose the appropriate options. Also note here the save path for backups, you may be asked to change this too. If you quickly browse to this folder, you should see LDF and SVI backup files, formerly for your View Manager configuration, latterly for View Composer.
- Backup LDIF using vdmexport – This item is specifically geared to backing up the View Manager configuration rather than both View and Composer.
- You need to know where vdmexport.exe is – it’s located in C:\Program Files\VMware\VMware View\Server\tools\bin
- To backup to LDIF, run vdmexport -f viewbackup.ldf
- Also know what the switches do. -f specifies file name, -v specifies verbatim (plain text format) mode and -c cleanses the backup file, removing passwords and sensitive data. You shouldn’t restore from a cleansed file, so I don’t expect the exam to ask you to do this. The -v and -c switches are added after the main backup command, so vdmexport.exe -f backup.ldf -v for example.
- Restore a View environment from a backup – To restore data from backup, you use the vdmimport.exe tool. This is kept in the same folder as the export tool, noted above.
- The import process essentially has two steps – first you need to decrypt the backup file and you then need to import it back into View. To do this, run vdmimport -d -p password -f backupfile.LDF > decryptedbackup.LDF. Omitting the -p switch will prompt you for the password, if you don’t want to type it clear text.
- To import the backup, run vdmimport -f decryptedbackup.LDF.
- Restoring Composer is slightly more involved, as we have to put data back into SQL/Oracle remember. Backup file names for Composer have an .svi extension and are also date stamped. This factor may come into play in the exam (e.g. restore Composer from June 5th)
- Copy the .svi backup file from a Connection Server to the server running View Composer
- Stop the Composer service so the database is not being written to as we restore
- We use the sviconfig.exe utility to restore the data to Composer, this is stored in C:\Program Files\VMware\VMware View Composer\sviconfig.exe (may also be located under C:\Program Files(x86) if you can’t find it).
- sviconfig.exe has five switches, and you need to know them all for a successful restore! -operation, -DSNname, Username, Password, BackupFilePath. -operation tells the utility we want to restore, -DSNname is the database source name defined under Data Sources in Windows Control Panel, Username is the database administrator account (so not a View administrator but one you used when creating the database), -password is the database administrator’s password and -backupfilepath is where the target .svi backup file is located.
- Putting all of that together, the command would look like this :-
- sviconfig.exe -operation=restoredata -dsnname=ComposerDB -username=ComposerDBO -password=P@ssword123 -backupfilepath=C:\Backup-20140221142435-vCenter.SVI
- Running sviconfig.exe at the command line will give you -operation values but little else, so if you can’t remember the other four switches, you may need to quickly lean on the Administration Guide PDF. If you basically think “database”, then you should be OK – so, DSN name, user, password and of course backup file. Actually quite straightforward.