backup: Allow configuring incremental backup per-disk individually

The semantics of the backup operation don't strictly require that all
disks being backed up are part of the same incremental part (when a disk
was checkpointed/backed up separately or in a different VM), or even
they may not have a previous checkpoint at all (e.g. when the disk
was freshly hotplugged to the vm).

In such cases we can still create a common checkpoint for all of them
and backup differences according to configuration.

This patch adds a per-disk configuration of the checkpoint to do the
incremental backup from via the 'incremental' attribute and allows
perform full backups via the 'backupmode' attribute.

Note that no changes to the qemu driver are necessary to take advantage
of this as we already obey the per-disk 'incremental' field.

https://bugzilla.redhat.com/show_bug.cgi?id=1829829

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Peter Krempa
2020-07-08 08:40:30 +02:00
parent 6f33e441e2
commit 7e5b993d3b
13 changed files with 133 additions and 17 deletions
+11
View File
@@ -69,6 +69,17 @@ were supplied). The following child elements and attributes are supported:
should take part in the backup and using ``no`` excludes the disk from
the backup.
``backupmode``
This attribute overrides the implied backup mode inherited from the
definition of the backup itself. Value ``full`` forces a full backup
even if the backup calls for an incremental backup, and ``incremental``
coupled with the attribute ``incremental='CHECKPOINTNAME`` for the disk
forces an incremental backup from ``CHECKPOINTNAME``.
``incremental``
An optional attribute giving the name of an existing checkpoint of the
domain which overrides the one set by the ``<incremental>`` element.
``exportname``
Allows modification of the NBD export name for the given disk. By
default equal to disk target. Valid only for pull mode backups.