VMware Application Consistent Backup with Quest vRanger

The large volume of dynamic data for critical transactional applications such as Microsoft Exchange and SQL Server can make reliable backups difficult to capture. vRanger simplifies this process by helping you to easily create application consistent backup copies of your critical databases with the option to truncate application logs – without needing to install agents in each VM. Application consistent backups with vRanger need to be enabled for each VM and for each job, and we’ll explore the simple steps to do so. First, let’s explore the mechanics.

 

Microsoft’s Volume Shadow Copy Service (VSS) is a service that coordinates various components and processes to create a consistent point-in-time copy of data known as a shadow copy. For a more detailed explanation of VSS technology, please refer to the Microsoft TechNet article How Volume Shadow Copy Service Works. Mr. Backup provides additional information about VSS in this blog.

 

The business value when utilizing VSS to quiesce VMs and critical guest transactional applications is really evident during restores. There are three types of backup consistency levels available with vRanger, depending on the extent of VSS usage:

 

Crash consistency - this is analogous to pulling the plug on a server and then performing a backup. All data in a crash consistent backup is captured at the same time, but the data in memory and any pending I/O operations are not captured. The state of the data being backed up then is indeterminate, and restoring this backup is equivalent to rebooting a server after a hard shut-down. Crash consistent backups may be fine for file and print servers. For transactional servers, restoring a crash consistent backup copy requires you to follow the same procedures needed to reboot the application after a crash. Crash consistent backups are achieved by not employing VSS to freeze or quiesce the application before making a backup copy.

 

File system consistency – this ensures that no file system writes are pending when the backup copy is created, but it doesn’t commit in memory transactions to disk. While adequate for normal VMs, file system consistent backups of transactional servers can result in lost or corrupted data since memory wasn’t flushed. When the backup copy is restored and re-mounted, the database may need to be repaired.

 

Application consistency – this results in the application flushing all of its memory and I/O operations to disk so the backup copy is in the same state as if the application had been properly shut down in a controlled manner. Another benefit is the ability to have certain applications, such as Exchange and SQL Server, which write transactions to log files instead of directly to the database files (in their default configurations), commit the contents of their log files to the database files (i.e., truncate their logs). Without log truncation, the log files will continue to grow and eventually consume all the available space (if the applications are left in their default configurations).

 

VMware provides VM quiescing capability through VMware Tools, including both a Filesystem Sync driver and a VSS driver. The Filesystem Sync driver is used to quiesce VMs running Windows XP and 2000, and provides file system consistent snapshots. The VSS driver is used to quiesce VMs running Windows Vista, 7, 2003, and 2008. The VSS driver can provide application consistent backups for guest OS newer than Windows 2003 on ESX 4.1 and newer hosts. On pre-ESX 4.1 hosts, the VSS driver provides file system consistent snapshots.

 

The VSS driver in VMware Tools includes a VSS Requestor and a VSS Snapshot Provider. The VSS Requestor is available inside the supported guest and operates at the VM level. When a snapshot includes the quiesce option, the host requests the guest OS to quiesce the disks via the VSS Requestor in VMware Tools. When the application is quiesced, the host is notified by the VSS Requestor and the snapshot is created. It is possible to achieve application level quiescing with VMware Tools, but the application isn’t notified that a full backup has taken place so the application won’t truncate its logs.

 

To ensure application consistent backups including log truncation, vRanger provides a VSS Requestor (vzshadow.exe) that works in connection with the VSS Requestor in VMware Tools. The vRanger VSS Requestor is deployed to the protected VM and activated by VMware Tools during quiescing. It sets the backup type to full when log truncation is enabled, letting the VSS Writer (Exchange, SQL Server, etc) know that a complete backup has taken place which triggers the application to perform log truncation.

 

The table below summarizes backup consistency levels possible with vRanger for different releases of Microsoft Windows servers and VMware vSphere hosts:

 

Guest Operating System

VMware Quiescing Driver Type Used

Level of vRanger Backup Consistency Using VMware Tools Only

Level of vRanger Backup Consistency Using VMware Tools and vRanger VSS Driver

Windows 2000 Server

Sync Driver

File system consistent

File system consistent

Windows Server 2003

VSS Driver

Application consistent, no log truncation

Application consistent + optional log truncation

Windows Server 2008 & Windows Server 2008 R2 on pre-ESX 4.1

VSS Driver

File system consistent

Application consistent + optional log truncation

Windows Server 2008 & Windows Server 2008 R2 on ESX 4.1 and newer

VSS Driver

Application consistent, no log truncation

Application consistent + optional log truncation

 

Configuring vRanger to create application consistent VM backups is extremely easy with the VSS tools configuration wizard. The wizard is available with ESX(i) 4.1 or newer with powered-on VMs running Windows Server 2008 or newer. For all other scenarios, the vRanger VSS Requestor can be installed manually.

 

In the My Inventory view, right-click the VM to be protected and select Configure VSS Tools:

 

In the popup Configure VSS Tools dialog box, enter the name and password for the VM and click Next:

 

All of the available VM disks will be shown in the Disks for VSS snapshot section:

 

To perform log truncation after the backup copy is created, leave the Perform application log truncation box checked, and click Configure:

 

vRanger configures the VM to capture application consistent backup copies with the application logs truncated after the backup copy is created. Then click Finish.

 

Next, in the back job configuration wizard, click the Enable guest quiescing box:

 

This option enables VMware Tools when creating a backup of the VM. The VSS Requestor in VMware Tools will be activated, which in turn activates the vRanger VSS Requestor we just configured. Each time the job runs, it will gracefully create an application consistent backup copy of the VM and its resident database, and the database will truncate its logs. When it comes time to restore, vRanger will quickly perform the operation with the application in a pristine, functional state.

 

To perform log truncation for applications in VMs locked down with Windows 2008 or newer with Windows User Access Control (UAC) enabled, you can configure the vRanger VSS Requestor manually as outlined in KB article SOL95327.

 

To perform log truncation for applications running in Windows 2003 VMs, configure the vRanger VSS Requestor manually as outlined in KB article SOL95339.

Anonymous