HiperLogic

Virtualization, High Performance Computing, Healthcare IT, Enterprise Computing

Veeam

You are currently browsing articles tagged Veeam.

I was asked today how to perform an application consistent backup of MySQL in a Linux Virtual Machine on VMware for a customer evaluating Veeam Backup.

On Windows, Veeam can do application consistent backups through the Veeam Microsoft Volume Shadow Copy Services (VSS) integration for VSS aware applications. Unfortunately Linux does not have a system like Microsoft Volume Shadow Copy Services (VSS) that allows applications to be made application consistent by backup applications like VMware vDR or Veeam Backup.

A simple workaround is to leverage VMware tools ability to call custom freeze/thaw scripts during a quiesced snapshot to enable customers to do the required application quiescence.

The example below is for MySQL, for other applications you need to know the application specific command to quiesce the application and modify the scripts below appropriately.

Step 1. Make sure VMware Tools are installed in the Linux VM
VMware Tools MUST be installed and should be up to date in your Linux Virtual Machine.
Step 2. Determine how to quiesce the application
To quiesce MySQL we will do a mysqldump to create a transactionally consistent backup of mysql without downtime.

Note the disadvantage of this method is that it takes more space since it creates a copy of the database. Alternatively, If you can stop/start mysql during an off hour backup that is a simple way to quiesce ( no transactions can occur if the database is stopped ) as well. You would stop mysql in the pre-freeze, and start mysql in the post-thaw in that case.

Step 3. Create /usr/sbin/pre-freeze-script
Below are the commands to type at the Linux command shell to create the pre-freeze script which will create a transactionally consistent backup of MYSQL and store the resulting statements in /var/mysqlbackup.todaysdate.sql

The resulting .sql file produced by mysqldump contains a set of SQL INSERT statements that can be used to reload the dumped tables at a later time

cat <<EOF > /usr/sbin/pre-freeze-script
mysqldump --single-transaction --all-databases > /var/mysqlbackup.\`date +"%m%d%y"\`.sql
EOF

Check the above command worked properly by examining the created script.

cat /usr/sbin/pre-freeze-script

The result of the cat command above should look like below

mysqldump --single-transaction --all-databases > /var/mysqlbackup.`date +"%m%d%y"`.sql

Make the script executable

chmod 755 /usr/sbin/pre-freeze-script

Step 4. Create the /usr/sbin/post-thaw-script
In this case we don’t have to call anything in the post-thaw so create an empty script :

  touch /usr/sbin/post-thaw-script
  chmod 755 /usr/sbin/post-thaw-script

Step 5. Enable VMware Tools Quiescence
Now check “Use VMware Tools Quiescence” in Veeam Backup, and Veeam will ask VMware tools to quiesce the VM, and VMware Tools will call /usr/sbin/pre-freeze-script and /usr/sbin/post-thaw-script to create the application consistent snapshot.

After the Veeam backup, login to the VM and validate the backup file with the date of the backup exists:

root@vCentos ~# ls -la /var/mysqlbackup.032411.sql
-rw-r--r-- 1 root root 422120 Mar 24 11:59 /var/mysqlbackup.032411.sql
root@vCentos ~#

You can customize the above procedure for any Linux application that provides a method to quiesce itself.

Tags: , , , ,

Veeam Backup has an option to write the last backup time to a vCenter attribute. This is a nice feature that enables anyone using the VMware VIC client to see the last time a VM was backed up.

This feature makes it easy to write a script to ensure all VMs are backed up by querying this attribute with PowerCLI. Veeam emails you the status of all VMs it knows about ( that are in backup jobs ), but it is possible someone could add a VM that does not get added to your existing Veeam backup jobs.

The script to check for this issue is below.

1. Modify the script below to have the name of your vCenter server in $vCenterServer
2. Configure your Veeam Backup job to write to the “Backup” attribute on completion ( The default is Notes attribute, which is often used by Admins for other items ).
3. This script assumes that every VM is backed up at least once a day.
4. Run this script at the PowerCLI command prompt. See this 5 minute guide to PowerCLI to get started.

function get-backedup ($vm)
{
# This should be one line
$val = $vm.CustomFields |where {$_.key -eq "Backup" } | select -Property Value
$today = Get-Date -Format "M/d/yyyy"
$backupDate = $val.Value

return ( $backupDate -like "*$today*" )

}

Connect-VIServer $vCenterServer 

$vms = get-vm
foreach ($vm in $vms)
{
  if (get-backedup($vm)) {
      write-host -foregroundcolor green "$vm is backed up"
  } else {
      write-host -foregroundcolor red "$vm is NOT backed up"
  }
}

Tags: ,

If you haven’t heard, the “legacy” backup method of using VMware VCB will be removed from the next release of vSphere, and the “modern” method will be to use the VMware Storage APIs for Data Protection (VADP). From the letter available here at VMware’s site:

The purpose of this letter is to inform you of our vSphere backup product strategy, ongoing enhancements, and end of availability plans for VMware Consolidated Backup.

VMware Backup Product Strategy
VMware released vStorage APIs for Data Protection (VADP) with the vSphere 4.0 release in May, 2009. VADP is the next generation of VMware’s backup framework. We have also been working with several backup partners to integrate VADP into their solutions to make backup of vSphere Virtual Machines fast, efficient and easy to deploy compared to VCB and other backup solutions. Several of our major backup partners have already released VADP integrated backup products and we expect most of the major backup partners to have VADP integrated backup software by the upcoming feature release of the vSphere platform in 2010.

Future Product Licensing
Given the strong interest and adoption of VADP by our backup eco-system and the benefits offered by VADP compared to VMware Consolidated Backup (VCB), we are announcing the End of Availability for VCB starting with next vSphere feature release in 2010. Starting with the next vSphere platform feature release, VCB will be removed from vSphere platform. VADP integrated backup products (including VMware Data Recovery) will be the recommended option for efficient backup and restoration of vSphere Virtual Machines. This will allow us to focus new value added feature development on VADP instead of two backup frameworks (VCB and VADP).”

This means if you plan on upgrading to vSphere and use VCB, you will want to have in your planning and budgeting a way to migrate to a backup vendor that supports VADP. Contact your preferred backup vendor today to see what their plans are for VADP support.

I personally recommend Veeam Backup and Replication ( HiperLogic is a Veeam Gold Partner, so maybe I am a bit biased) for the simple matter of fact that ESX 3.5 users can use it today with their 3.5 installation, and migrate seamlessly to current and future vSphere releases. There is some peace of mind that the mechanism you back up with today will let you restore tomorrow.

VMware has a backup appliance bundled with vSphere that uses VADP known as vDR (VMware Data Recovery), but as of the current vSphere release I typically don’t recommend it, see the post on this subject vDR vs Veeam Backup. It is quite possible that VMware’s vDR product will get some more development pumped into it once VCB is removed from vSphere this year, by then though Veeam SureBackup will be out.

Tags: , ,

Now that VMware Data Recovery 1.0 (vDR)  is released and  included with many VMware  bundles ( Other than VMware Essentials and VMware Standard Edition),  customers ask us questions on when to use vDR  1.0 vs. an enterprise solution like Veeam Backup and Replication 4.1. ( HiperLogic sells/supports both products.)

Our general opinion is that vDR 1.0 is not a production level backup tool yet , and everything vDR 1.0 does, Veeam Backup and Replication does ( e.g. data deduplication,  VSS support, full VM and file level recovery, etc). 

Note that vDR is a 1.0.x release. VMware rolls out great features on an aggressive schedule. However,  if 1.0, 1.01, 1.0.2, 1.2  bugs/issues with your backups gives you trouble sleeping at night, stick with Veeam Backup and Replication or similar enterprise level tool that is time tested and customer weathered.

The following table highlights some of the major differentiators that you will want to consider when trying to decide if vDR 1.0 offers sufficient protection for your environment.  

VMware vDR vs Veeam Backup and Replication
Feature VMware vDR Veeam Backup and Replication 4.1
Windows/Linux Image and File Level Recovery Yes Yes
De-duplication of Backups Yes Yes
Suppports more than 100 VMs per appliance No Yes
Full GUI and Command Line/PowerShell support No Yes
Email reporting of backup job status No Yes
Built-in Replication for Disaster Recovery No Yes

This is not an exhaustive list of course, this is just some of the “biggies”. The next release of Veeam Backup and Replication 5.0 will really set a new bar.

A study of companies that lost data in a disaster conducted by the U.S. Small Business Administration revealed 50% never reopened, and 90% went out of business within two years.  With a list price cost of Veeam Backup coming in at less than $1,000 per dual socket ESX server, Veeam Backup continues to be an excellent insurance policy against disaster for SMB and the Enterprise.

Updates ( Last Update 7/13/2010 for vSphere 4.1 )

vDR doesn’t support linked Virtual Center’s.

vDR appliance has a limit of 1TB per data store, max 2 data stores per appliance.

vDR 1.2 Now has File Level Restore (FLR) for use with Linux, though from the 1.2 release notes there are changes to the guests needed to work in many cases 6/11/2010

Tags: ,

© 2006-2010 HiperLogic, LLC.  |  Serving the Ann Arbor, Southeast Michigan, and Ohio region  |  (888)-268-3930  |