[libvirt] [PATCH v8 03/21] backup: Introduce virDomainCheckpoint APIs
Peter Krempa
pkrempa at redhat.com
Wed Apr 24 13:26:05 UTC 2019
On Wed, Apr 17, 2019 at 09:09:03 -0500, Eric Blake wrote:
> Introduce a bunch of new public APIs related to backup checkpoints.
> Checkpoints are modeled heavily after virDomainSnapshotPtr (both
> represent a point in time of the guest), although a snapshot exists
> with the intent of rolling back to that state, while a checkpoint
> exists to make it possible to create an incremental backup at a later
> time.
>
> The following map shows the API relations to snapshots, with new APIs
> on the right:
>
> Operate on a domain object to create/redefine a child:
> virDomainSnapshotCreateXML virDomainCheckpointCreateXML
>
> Operate on a child object for lifetime management:
> virDomainSnapshotDelete virDomainCheckpointDelete
> virDomainSnapshotFree virDomainCheckpointFree
> virDomainSnapshotRef virDomainCheckpointRef
>
> Operate on a child object to learn more about it:
> virDomainSnapshotGetXMLDesc virDomainCheckpointGetXMLDesc
> virDomainSnapshotGetConnect virDomainCheckpointGetConnect
> virDomainSnapshotGetDomain virDomainCheckpointGetDomain
> virDomainSnapshotGetName virDomainCheckpiontGetName
> virDomainSnapshotGetParent virDomainCheckpiontGetParent
> virDomainSnapshotHasMetadata virDomainCheckpointHasMetadata
> virDomainSnapshotIsCurrent virDomainCheckpointIsCurrent
The 'current' checkpoint has very sparse documentation. While it makes
some sense for the current snapshot to exist I'm not persuaded we need
this for checkpoints.
In case of checkpoints the bitmaps backing it track the state even if
you create a new bitmap unlike checkpoints. Thus it does not seem to
make sense to me.
If you think it does please elaborate, ideally in form of documentation.
> Operate on a domain object to list all children:
> virDomainSnapshotNum (no counterpart, this is the old
> virDomainSnapshotListNames racy interface)
> virDomainSnapshotListAllSnapshots virDomainListAllCheckpoints
>
> Operate on a child object to list descendents:
> virDomainSnapshotNumChildren (no counterpart, this is the old
> virDomainSnapshotListChildrenNames racy interface)
> virDomainSnapshotListAllChildren virDomainCheckpointListAllChildren
>
> Operate on a domain to locate a particular child:
> virDomainSnapshotLookupByName virDomainCheckpointLookupByName
> virDomainHasCurrentSnapshot virDomainHasCurrentCheckpoint
> virDomainSnapshotCurrent virDomainCheckpointCurrent
>
> Operate on a snapshot to roll back to earlier state:
> virDomainSnapshotRevert (no counterpart, instead checkpoints
> are used in incremental backups via
This patch or a different one should also add docs to virDomainSnapshotRevert
that outline what happens to the checkpoints when reverting snapshots.
Basically what should happen is that an alternate reality should
probably be created as the disk images can change at that point
> XML to virDomainBackupBegin)
>
> Signed-off-by: Eric Blake <eblake at redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190424/d4e97e4a/attachment-0001.sig>
More information about the libvir-list
mailing list