+ One method of capturing domain disk backups is via the use of
+ incremental backups. Right now, incremental backups are only
+ supported for the QEMU hypervisor when using qcow2 disks at the
+ active layer; if other disk formats are in use, capturing disk
+ backups requires different libvirt APIs.
+
+
+ Libvirt is able to facilitate incremental backups by tracking
+ disk checkpoints, which are points in time against which it is
+ easy to compute which portion of the disk has changed. Given a
+ full backup (a backup created from the creation of the disk to a
+ given point in time), coupled with the creation of a disk
+ checkpoint at that time, and an incremental backup (a backup
+ created from just the dirty portion of the disk between the
+ first checkpoint and the second backup operation), it is
+ possible to do an offline reconstruction of the state of the
+ disk at the time of the second backup without having to copy as
+ much data as a second full backup would require. Future API
+ additions will make it possible to create checkpoints in
+ conjunction with a backup
+ via virDomainBackupBegin() or with an external
+ snapshot via virDomainSnapshotCreateXML2; but for
+ now, libvirt exposes enough support to create disk checkpoints
+ independently from a backup operation
+ via virDomainCheckpointCreateXML().
+
+
+ Attributes of libvirt checkpoints are stored as child elements
+ of the domaincheckpoint element. At checkpoint
+ creation time, normally only
+ the name, description,
+ and disks elements are settable. The rest of the
+ fields are ignored on creation and will be filled in by libvirt
+ in for informational purposes
+ by virDomainCheckpointGetXMLDesc(). However, when
+ redefining a checkpoint, with
+ the VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE flag
+ of virDomainCheckpointCreateXML(), all of the XML
+ fields described here are relevant on input, even the fields
+ that are normally described as readonly for output.
+
+
+ A checkpoint is marked current if the hypervisor is actively
+ updating the checkpoint as guest operations modify the disk
+ after the point where the checkpoint was created. When tracking
+ multiple checkpoints, a hypervisor may choose to either have all
+ relevant checkpoints be current (a guest write updates the
+ associated tracking for each checkpoint), or to have a single
+ checkpoint be current (older checkpoints stop tracking changes
+ when a newer one is created, and describing all changes since an
+ older checkpoint then involves libvirt automatically combining
+ the changes from the chain of checkpoints from the current back
+ to the checkpoint in question; the QEMU hypervisor uses this
+ method). Checkpoints are maintained in a hierarchy to facilitate
+ hypervisors that use this latter method, where libvirt
+ automatically updates the parent-child relationship as well as
+ which checkpoint is current when creating or deleting
+ checkpoints. For now, the creation of checkpoints is not
+ possible when external snapshots exist, but this may be added in
+ the future.
+
+
+ The top-level domaincheckpoint element may contain
+ the following elements:
+
+
+
name
+
The optional name for this checkpoint. If the name is
+ omitted, libvirt will create a name based on the time of the
+ creation.
+
+
description
+
An optional human-readable description of the checkpoint.
+ If the description is omitted when initially creating the
+ checkpoint, then this field will be empty.
+
+
disks
+
On input, this is an optional listing of specific
+ instructions for disk checkpoints; it is needed when making a
+ checkpoint on only a subset of the disks associated with a
+ domain. In particular, since QEMU checkpoints require qcow2
+ disks, this element may be needed on input for excluding guest
+ disks that are not in qcow2 format. If the entire element was
+ omitted on input, then all disks participate in the
+ checkpoint, otherwise, only the disks explicitly listed which
+ do not also use checkpoint=3D'no' will
+ participate. On output, this is the checkpoint state of each
+ of the domain's disks.
+
+
disk
+
This sub-element describes the checkpoint properties of
+ a specific disk with the following attributes:
+
+
name
+
A mandatory attribute which must match either
+ the <target dev=3D'name'/> or an
+ unambiguous <source file=3D'name'/>
+ of one of
+ the disk
+ devices specified for the domain at the time of
+ the checkpoint.
+
checkpoint
+
An optional attribute; possible values
+ are no when the disk does not participate
+ in this checkpoint; or bitmap if the disk
+ will track all changes since the creation of this
+ checkpoint via a bitmap.
+
bitmap
+
The attribute bitmap is only valid
+ if checkpoint=3D'bitmap'; it describes the
+ name of the tracking bitmap (defaulting to the
+ checkpoint name).
+
size
+
The attribute size is ignored on input;
+ on output, it is only present if
+ the VIR_DOMAIN_CHECKPOINT_XML_SIZE flag
+ was used to perform a dynamic query of the estimated
+ size in bytes of the changes made since the checkpoint
+ was created.
+
+
+
+
+
creationTime
+
A readonly representation of the time this checkpoint was
+ created. The time is specified in seconds since the Epoch,
+ UTC (i.e. Unix time).
+
+
parent
+
An optional readonly representation of the parent of this
+ checkpoint. If present, this element contains exactly one
+ child element, name.
+
+
current
+
A readonly integer, 1 if this checkpoint is current (that
+ is, actively tracking guest changes) or 0 if the checkpoint is
+ inactive because a child checkpoint is now tracking changes.
+
+
domain
+
A readonly representation of the
+ inactive domain configuration
+ at the time the checkpoint was created. This element may be
+ omitted for output brevity by supplying
+ the VIR_DOMAIN_CHECKPOINT_XML_NO_DOMAIN flag, but
+ the resulting XML is no longer viable for use with
+ the VIR_DOMAIN_CHECKPOINT_CREATE_REDEFINE flag
+ of virDomainCheckpointCreateXML(). The domain
+ will have security-sensitive information omitted unless the
+ flag VIR_DOMAIN_CHECKPOINT_XML_SECURE is provided
+ on a read-write connection.
+
With that checkpoint created, the qcow2 image is now tracking
+ all changes that occur in the image since the checkpoint via
+ the persistent bitmap named 1525889631.
+
+
+
diff --git a/docs/formatsnapshot.html.in b/docs/formatsnapshot.html.in
index 92cc566467..2bfb69cf49 100644
--- a/docs/formatsnapshot.html.in
+++ b/docs/formatsnapshot.html.in
@@ -91,7 +91,9 @@
sets that snapshot as current, and the prior current snapshot is
the parent of the new snapshot. Branches in the hierarchy can
be formed by reverting to a snapshot with a child, then creating
- another snapshot.
+ another snapshot. For now, the creation of external snapshots
+ when checkpoints exist is forbidden, although future work will
+ make it possible to integrate these two concepts.
The top-level domainsnapshot element may contain
diff --git a/docs/index.html.in b/docs/index.html.in
index 2bd647f8dd..7d0ab650e3 100644
--- a/docs/index.html.in
+++ b/docs/index.html.in
@@ -58,7 +58,8 @@
storage pool capabilities,
node devices,
secrets,
- snapshots
+ snapshots,
+ checkpoints