Libvirt Plugin: Backup Strategies

Enterprise

Bacula Enterprise Only

This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.

Installing Bacula Client on Each Guest VM

With this strategy, the Bacula Enterprise Libvirt Plugin is not used. Instead, a Bacula Enterprise File Daemon is installed on each virtual machine, treating them as standard physical clients.

To optimize the I/O usage on the hypervisor, Bacula Schedules, Job Priorities, and Job Concurrency settings should be used to distribute backup jobs across the backup window. Since multiple guest VMs may reside on the same storage on the hypervisor, , running all backup jobs simultaneously can create a bottleneck on disk/network subsystems.

Installing a Bacula Enterprise File Daemon on each virtual machine allows you to manage virtual servers in the same way as physical servers and enables the use of the full range of Bacula Enterprise features, including:

  • Quick restores of individual files

  • Checksums of individual files for Virus and Spyware detection

  • Verify Jobs

  • File or Directory exclusion (e.g., swap or temporary files)

  • File-level compression

  • Accurate backups

  • Plugins

Image Backup with Libvirt Plugin

With the image-level backup strategy, the Bacula Enterprise Libvirt Plugin saves VM disks as QCOW2 images for QEMU VMs. This applies to Full, Incremental and Differential backups.

In this case, a Bacula File Daemon is not required in each guest VM.

Instead, the Libvirt Plugin communicates directly with the Libvirt-compatible hypervisor to read and back up the contents of virtual machine disks using the Libvirt API.

Because Bacula does not need to walk through Client filesystems to stat, open, read, and close files, this method consumes fewer resources on the hypervisor infrastructure compared to file-level backups performed inside each VM. However,it also means that unnecessary data, such as swap or temporary files, is included in the backup.

Tip

In addition to disk images, the Libvirt Plugin also backs up guest VM configuration files. This enables fast and straightforward restores of entire virtual machines.

Disk Format Compatibility for Checkpoint Backups

The Bacula Enterprise Libvirt Plugin is compatible with the QCOW2 (v3) disk format. This version is required for incremental backups as it supports dirty bitmaps.

If you are using an older version, you can convert the image to the required format using the following command:

qemu-img convert -O qcow2 -o compat=1.1 disk-old.qcow2 disk.qcow2

If you are using a RAW disk format, it can be converted to QCOW2 as follows:

qemu-img convert -f raw -O qcow2 -o compat=1.1 disk-old.img disk.qcow2

Tip

To verify whether a disk image is using QCOW2 version 3, you can inspect it with qemu-img info:

qemu-img info disk.qcow2

If the value of compat parameter is 1.1, the newer format is in use.

Recommendation

The Bacula Enterprise Libvirt Plugin exposes all virtual machine disks via NBD using a single port. If you need to run parallel backup jobs for different virtual machines, you must assign a dedicated port using the nbd_server_port and nbd_client_port parameters in each Bacula Fileset.

Go back to: Libvirt Plugin.