Backup and Restore Strategies

This article presents information regarding backup and restore strategies of the Nutanix-AHV Plugin.

Installing Bacula Client on Each Guest

This strategy works by installing a Bacula Enterprise File Daemon on every virtual machine as if they were normal physical clients. In order to optimize the I/O usage on the Nutanix-AHV hypervisor, the user will use Bacula’s Schedules, Priorities, and Maximum Concurrent Jobs to spread backup jobs over the backup window. Since all VMs could use the same storage on the Nutanix-AHV hypervisor, running all backup jobs at the same time could create a bottleneck on the disk/network subsystem since Bacula will walk through all filesystems to open/read/close/stat files.

Installing a Bacula Enterprise File Daemon on each virtual machine permits to manage virtual servers like physical servers and also to use all Bacula Enterprise’s features such as:

  • Quick restores of individual files

  • Checksum of individual files for Virus and Spyware detection

  • Verify Jobs

  • File/Directory exclusion (such as swap or temporary files)

  • File level compression

  • Accurate backups.

Image Backup With Nutanix-AHV Plugin

With the image backup level strategy, the Bacula Enterprise Nutanix-AHV Plugin will save the Client disks at the raw level, in the Nutanix-AHV context.

Bacula’s Nutanix-AHV Plugin will query the guest VM through the hypervisor API to read and save the content of virtual machines disks using snapshots and the native Nutanix Filesystem (NDFS). During backups, Nutanix-AHV Plugin will save the integrity of disks images and also guest VM configurations to allow guest VM restores with their original parameters.

All those operations are handled by an additional proxy VM which is described in the next section.

Proxy Virtual Machine

To handle backup and restore operations in the Nutanix-AHV environment a proxy VM needs to be set up. This specific virtual machine handles most of the operations (snapshot management, IO, ,…) during backup and restore. These operations will be discussed in more detail in the next sections.

The proxy VM must have the following characteristics:

  • Linux based operating system

  • Bacula File Daemon installed (bacula-enterprise-client package) and running, configured as a Client Resource on the Bacula Director

  • Nutanix-AHV Plugin (bacula-enterprise-nutanix-ahv-plugin package) installed

  • Network access to the Nutanix-AHV REST API.

While there is theoretically no restriction for the type of Linux OS and the number of cores, during development and testing an Ubuntu LTS VM with four cores was used as a proxy VM.

Ingestion

The ingestion of a single virtual disk is a specific protocol which takes the following steps:

  • From guest VM snapshot find NDFS paths of all modified disks.

  • Use said NDFS path to list changed regions on the disk either from its base state or from a previous snapshot.

  • Use said NDFS path again to hotplug a copy of the disk onto the proxy VM.

  • Export the list of changed regions and raw disk image data to a Bacula Storage Daemon

  • Unplug relevant disk from proxy VM

Backups can be performed for a guest VM in any power state (running or halted). For proper execution of Incremental or Differential backups it is required by the Nutanix-AHV plugin to store previous snapshots in order to compute changed block information.

Snapshots created by the Nutanix-AHV plugin are identified by JobID and the UUID of the guest VM. The plugin keeps track of dependencies between jobs and their respective snapshots to automatically delete snapshots that are no more relevant.

The backup will create the following backup files for each guest VM:

  • A single empty file to match a guest VM name to its UUID /@nutanix-ahv/<vmUuid>_<vmName>.name

  • A single configuration metadata file: /@nutanix-ahv/<vmUuid>/conf.<epoch>.conf

  • A list of data regions for each virtual disk: /@nutanix-ahv/<vmUuid>/<diskUuid>.<epoch>.bmp

  • A list of zeroed regions for each virtual disk: /@nutanix-ahv/<vmUuid>/<diskUuid>.<epoch>.abmp

  • A raw data file for each virtual disk: /@nutanix-ahv/<vmUuid>/<diskUuid>.<epoch>.bvmdk

At restore time the user can identify the guest VM using the UUID to mark the corresponding files:

+-------------------------------------------------------------------------------------------------------------+
| filename                                                                                                    |
+-------------------------------------------------------------------------------------------------------------+
| /@nutanix-ahv/690d74f9-9ce4-45fb-9b23-149afebe18f7_VmName.name                                              |
| /@nutanix-ahv/690d74f9-9ce4-45fb-9b23-149afebe18f7/conf.1646137248688.conf                                  |
| /@nutanix-ahv/690d74f9-9ce4-45fb-9b23-149afebe18f7/eef9d485-dba3-4e3f-b828-46a8c3412bec.1646137267248.bmp   |
| /@nutanix-ahv/690d74f9-9ce4-45fb-9b23-149afebe18f7/eef9d485-dba3-4e3f-b828-46a8c3412bec.1646137267248.abmp  |
| /@nutanix-ahv/690d74f9-9ce4-45fb-9b23-149afebe18f7/eef9d485-dba3-4e3f-b828-46a8c3412bec.1646137267262.bvmdk |
+-------------------------------------------------------------------------------------------------------------+

Network Restore

The Nutanix-AHV plugin restores network interfaces. The user can influence the process using the two restore plugin parameters disconnect_network and network_address.

When attaching a new network interface to a guest VM the API alters the creation based on three factors:

  • Is the NIC connected to the network?

  • Does the NIC requests an ip address?

  • If the NIC requests an ip address does it requires a specific one?

By default the Nutanix-AHV plugin does the following:

  • It uses the disconnect_network argument to know whether to disconnect the NIC or not. The default value is false

  • If the original guest VM had an ip address, the restored guest VM will request one

  • If specified with the network_address plugin parameter, it asks for the relevant static address

If this default execution fails, the Nutanix-AHV plugin will try again with a disconnected NIC.

Note

The Nutanix-AHV plugin allows the request of static IP addresses only on a managed network.

Go back to the main Nutanix-AHV Plugin page.