Protecting virtual machines with Retrospect and VMware Consolidated Backup
Retrospect’s integration with VMware Consolidated Backup (VCB) allows a Retrospect server running on a VCB proxy server to provide both file- and image-level backups and duplicates of a virtual machine (VM) without requiring the VM to be suspended or shut down. This is accomplished through Retrospect’s External Scripting functionality, which calls the necessary pre- and post-scripts on the VCB proxy server.
Note: External Scripting is intended for advanced users who possess at least a rudimentary knowledge of one or more scripting languages supported by Windows Scripting Host. For more information, see the External Scripting section of Chapter 10, “Tools,” in the Retrospect User’s Guide.
Before getting started with configuration, several prerequisites must be satisfied:
- A VCB proxy server must be setup, configured for its environment, and running as outlined in the Virtual Machine Backup Guide available from VMware’s website at www.vmware.com.
- VMware Tools must be installed in each guest OS to be protected.
- Retrospect Single Server (Disk-to-Disk) or higher must be installed directly on the VCB proxy server. A Retrospect Multi Server license is required to back up or restore files directly to a guest server OS with the Retrospect Client running in a VM.
- The VCB proxy server must have enough disk space avail able to hold the largest image to be backed up or restored.
- This method of protecting VMs supports ESX 3 and 4; ESXi 5 is not supported by this method.
Configuring VCB for backups
Before configuring Retrospect to back up VMs, the VCB config.js settings file, located on the VCB proxy server (e.g. C:\YOUR_VCB_FRAMEWORK\config\config.js) must be modified. The variables that must be modified are:BACKUPROOT=<path_to_mount>; (ex: BACKUPROOT=”C:\\vcb_mnts”;)
HOST=<esxserver_hostname>; (ex: HOST=”esxserver.vmware.com”;)
USERNAME=<user name>; (ex: USERNAME=”vcbUser”;)
PASSWORD=<password>; (ex: PASSWORD=”vcbpasswd”;)
VM_LOOKUP_METHOD=”name”; (ex: VM_LOOKUP_METHOD=”name”;)
PREEXISTING_MOUNTPOINT=”delete”; (ex: PREEXISTING_MOUNTPOINT=”delete”;)
PREEXISTING_VCB_SNAPSHOT=”delete”; (ex: PREEXISTING_VCB_SNAPSHOT=”delete”;)
Configuring Retrospect and Backing Up
Most of the work necessary prior to running backups of VMs takes place in the Retrospect Event Handler script and the Retrospect application.
Editing the retro.ini File
In order for Retrospect to communicate with VCB, the retro.ini file located in the Retrospect application directory must be edited. Open the retro.ini file with a text editor and add the following line in the [OEM] section:
- Save and close the retro.ini file.
The default install location for the Retrospect application is:
C:\Program Files\Retrospect\Retrospect 8.0
Retrospect Event Handler Settings
The Retrospect Event Handler is an external script through which Retrospect communicates information to other programs. VCB scripting is handled with a special Retrospect Event Handler, VCB_RetroEventHandler.bat. A sample script is provided in the External Scripts folder located in the application directory.
The default install location is:
C:\Program Files\Retrospect\Retrospect 8.0\External Scripts\Sample VCB
Note: It is recommended that a copy of the VCB_RetroEventHandler.bat file be created before any changes are made.
Configuring the VCB_RetroEventHandler.bat file is straightforward; only the VCB_FRAMEWORK_PATH variable needs to be set:
Activating the VCB_RetroEventHandler
To activate the VCB_RetroHandler.bat script, copy it to the same folder as the Retrospect Config file.
For Windows XP and Server 2003:c:\Documents and Settings\All Users\Application Data\Retrospect\;
For Windows Vista and Windows 7:c:\Users\All Users\Retrospect\
For Windows 8, Server 2008 and Server 2012:c:\Application Data\Retrospect\
Creating Virtual Machine Backup Scripts
The following process needs to be repeated for each VM and each type of backup (file or image).
To create Virtual Machine Backup Scripts:
- Create a temporary folder in the VCB mount points directory which is specified by the variable BACKUPROOT in VCB config.js.
- Define the mount point as a subvolume in Retrospect.
- Define a backup script with a name beginning with VCB_ (e.g. VCB_mytestvm_backup) and specify the subvolume defined above as source.
To perform an image-level backup of a VM named mytestvm.foo.com, the folder must be named:
To perform a file-level backup, the folder must be named:
Once all of the above steps have been completed, Retrospect is ready to back up VMs.
Note: For file-level backups, when VCB mounts a VM’s drive, folder and file hierarchy, it creates identical views within two directories, one called “letters” and other called “digits”. Retrospect only backs up the contents from directory letters.
Restoring Data to Virtual Machines
For each type of backup, either file-based or image-based, there is a corresponding restore method. Data from file-level backups are typically restored via Retrospect Client software running in the VM, whereas image-based backups are first restored to a directory on the VCB proxy server before being moved to the ESX or vCenter Server using VMware Converter.
Restoring from File-Level Backups
File-level backups provide the ability to restore individual files to any
physical or virtual computer that is running the Retrospect Client software. Because Retrospect backs up the file and folder structure from a VCB mount points directory, which buries the virtual volumes inside additional levels of folder hierarchy, this method does not allow for full machine restores.
To perform folder and file-level restores using the Retrospect Client software installed inside a VM, refer to Chapter 4 of the Retrospect User’s Guide.
Restoring from Image-Level Backups
While image-level backups of VMs don’t allow for smaller, incremental backups, they do provide the very fastest complete restore of an entire VM. Restoring from an image-level backup is a two-step process. First, use Retrospect to restore the VM image (usually made up of multiple .vmdk files) to a new folder on the VCB proxy server. Once that step is completed, use one of the methods outlined in VMware’s Virtual Machine Backup Guide to complete the process of restoring the image to ESX or vCenter Server storage.