[libvirt] [RFC v3] external (pull) backup API
Eric Blake
eblake at redhat.com
Fri Jun 8 19:50:27 UTC 2018
On 05/17/2018 05:43 PM, Eric Blake wrote:
> Here's my updated counterproposal for a backup API.
>
> /**
> * virDomainBackupEnd:
> * @domain: a domain object
> * @id: the id of an active backup job previously started with
> * virDomainBackupBegin()
> * @flags: bitwise-OR of supported virDomainBackupEndFlags
> *
> * Conclude a point-in-time backup job @id on the given domain.
> *
> * If the backup job uses the push model, but the event marking that
> * all data has been copied has not yet been emitted, then the command
> * fails unless @flags includes VIR_DOMAIN_BACKUP_END_ABORT. If the
> * event has been issued, or if the backup uses the pull model, the
> * flag has no effect.
> *
> * Returns 0 on success and -1 on failure.
> */
> int virDomainBackupEnd(virDomainPtr domain, int id, unsigned int flags);
For this API, I'm considering a tri-state return, 1 if the backup job
completed successfully (in the push model, the backup destination file
is usable); 0 if the backup job was aborted (only possible if
VIR_DOMAIN_BACKUP_END_ABORT was passed, the backup destination file is
untrustworthy); and -1 on failure.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
More information about the libvir-list
mailing list