[libvirt] [PATCH v7 15/23] backup: Implement virsh support for checkpoints

Eric Blake eblake at redhat.com
Wed Mar 27 15:48:52 UTC 2019


On 3/27/19 10:43 AM, Eric Blake wrote:
> On 3/27/19 9:29 AM, Ján Tomko wrote:
>> On Wed, Mar 27, 2019 at 05:10:46AM -0500, Eric Blake wrote:
>>> Introduce a bunch of new virsh commands for managing checkpoints
>>> in isolation. More commands are needed for performing incremental
>>> backups, but these commands were easy to implement by modeling
>>> heavily after virsh-snapshot.c (no need for checkpoint-revert,
>>> and checkpoint-list was a lot easier since we don't have to cater
>>> to older libvirt API).
>>>
>>> Signed-off-by: Eric Blake <eblake at redhat.com>
> 
>>> +    if (virshLookupCheckpoint(ctl, cmd, "checkpointname", true, dom,
>>> +                              &checkpoint, &name) < 0)
>>> +        goto cleanup;
>>> +
>>> +    vshPrint(ctl, "%-15s %s\n", _("Name:"), name);
>>> +    vshPrint(ctl, "%-15s %s\n", _("Domain:"), virDomainGetName(dom));
>>
>> We have vshTableNew and vshTableRowAppend that can compute the
>> indentation at run-time regardless of the locale.
> 
> Nice! Those were added after I forked from snapshot code 6 months ago. I
> wonder if I can get some code sharing between the two in virsh the way I
> did with code sharing in src/conf/.

I also seem to recall seeing recent code changes to output '-' instead
of a blank column, such as for a 'Parent' column vs. roots with no
parents. Snapshot code doesn't appear to be doing that yet; if it does
start doing that, checkpoints should do likewise.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190327/9e13ba56/attachment-0001.sig>


More information about the libvir-list mailing list