Hot Backup of MySQL on a Linux VM From a Linux Guest Virtual Machine
As more organizations move to virtualization to facilitate core infrastructure, they look to the eco-system vendors to provide necessary core services, such as backup. Who better to help them meet those requirements than the virtualization vendors themselves? This document describes the process required to take a consistent backup of MySQL running in a Linux virtual machine guest.
VMware enhanced the ability to take offline snapshots for the backup of virtual machines with the advent of VCB (VMware Consolidated Backup) and more recently the vStorage API for data protection. These tools allow third-party vendors to make use of API calls to produce LAN-free consistent snapshots of virtual machines. This is achieved by providing a block list to the backup proxy allowing for access of the virtual machine’s disk subsystem. The block list is presented across a Storage Area Network (SAN)/ Network Attached Storage (NAS), Fibre channel, ISCSI or NAS, allowing backup I/O to occur away from the production LAN orientated traffic. The result of these API calls is an Agentless live image-level copy of the virtual disks, or an Agentless file-level mount of the virtual disks. With Microsoft database centric applications like Active directory, SQL and Exchange a transaction consistent backup of these applications is possible with the use of Microsoft Volume Shadow copy Services aka VSS. During backup and at the point the snapshot is created, backup vendors are able to interface with VSS to place these applications in a temporary consistent state just for the period of the snapshot creation. Unfortunately MySQL is not VSS aware especially in a non-Microsoft operating system like Linux so a new approach has to be taken to produce a transaction consistent backup of MySQL databases.
Senior Systems Engineer