Document navigation

Data Backup

The backup service performs data backup at the QEMU block-device layer and supports VMs on all data storage types. A full backup contains the complete data set, while an incremental backup contains only data changed since the preceding backup. Both backup types copy only data that is actually in use.

By default, after the initial full backup, the backup following every 63 incremental backups is another full backup. Restoring a VM requires the selected recovery point, all preceding incremental backups, and the full backup on which they depend. The maximum backup-chain length is therefore 64. The system also selects an appropriate backup method according to the current backup state to protect backup-data integrity.

The data backup process consists of data replication, data transfer, and data retention.

Data Replication

The backup service uses the dirty-data tracking capability (Dirty Bitmap) at the QEMU block-device layer to export backup data.

Locations in the virtual machine's disk where data changes occur are called dirty data locations. The Dirty Bitmap records all such locations in the virtual disk file that have been modified since the last backup. Based on these records, all data modified since the last backup (incremental backup data) can be exported.

The full backup and subsequent incremental backups form a complete backup chain. Because the Dirty Bitmap is held in the memory of the QEMU process, its tracking data is lost when the VM restarts. The first backup after a VM restart is therefore automatically performed as a full backup.

See Figure 1 for an illustration.
Figure 1. Dirty Bitmap


Data Transfer

Two implementations are available for different virtualization component versions. They differ mainly in how backup data is transferred.

Scheme 1: Data over SSHFS. SSHFS mounts the backup directory of remote backup storage on the compute node, which then transfers backup data into backup storage. SSHFS is a FUSE-over-SSH implementation. The SSH session encrypts the data channel, and each backup plan uses a dedicated SSHFS connection.

See Figure 2 for an illustration.
Figure 2. Data Over SSHFS


Scheme 2: Data over NBD. The NBD module on backup storage exports a backup disk. A QEMU block job on the compute node then writes backup data directly to that disk.

See Figure 3 for an illustration.
Figure 3. Data Over NBD


Data Retention

The backup storage supports various storage media types, including SAN, NAS, disk arrays, and tape libraries.

Backup storage retains data in deduplicated chunks. Backup data is split into 64 MB chunks, and a hash and index are generated for each chunk. Chunks with identical hash values are stored only once.

See Figure 4 for an illustration.
Figure 4. Chunked Data Retention