[libvirt-users] Live Snapshot and Rebasing using blockpull

Andrew Martin amartin at xes-inc.com
Mon Aug 20 19:15:46 UTC 2012


Eric, 


Thanks for the clarification. I will wait for a backport of qemu 1.1 for Ubuntu 12.04 so I can use the safer 'transaction' monitor command for performing live snapshots/backups. Is there any other recommended method for live backups? 


Andrew 

----- Original Message -----

From: "Eric Blake" <eblake at redhat.com> 
To: "Andrew Martin" <amartin at xes-inc.com> 
Cc: libvirt-users at redhat.com 
Sent: Friday, August 17, 2012 9:43:23 AM 
Subject: Re: [libvirt-users] Live Snapshot and Rebasing using blockpull 

On 08/17/2012 08:27 AM, Andrew Martin wrote: 
> 
> 1. virsh snapshot-create-as to create the snapshot 
> 2. cp myvm.qcow2 myvm-backup.qcow2 to copy off the now read-only backing image file 
> 3. virsh blockpull to merge the base and snapshot images together into a single image again 

Yep. As long as you don't mind the single image changing names, this 
works (and if you _do_ mind it changing names, you can do the process 
twice to get back to the original name, although that's obviously not 
very efficient). 

There are future improvements coming down the pipeline for even more 
efficient block manipulations, but they missed the qemu 1.2 cutoff, so 
now I have to wait for qemu 1.3 (probably closer to December of this 
year) before having libvirt control over those features - but I am 
actively working on this area of code. 

> 
> 
> Is this functionality only available in qemu 1.1? 

snapshot-create-as was introduced in libvirt 0.9.5, and requires the 
qemu 'blockdev-snapshot-sync' monitor command (since 0.14.0), but 
prefers the 'transaction' monitor command (since 1.1) for safety. 

blockpull was introduced in libvirt 0.9.4, and requires the qemu 
'block-stream' monitor command (since 1.1). 

> I am using Ubuntu 12.04 LTS on production servers which only includes qemu 1.0.x. Is there a safe alternative for accomplishing live backups like this on qemu 1.0.x? Is there a minimum version of libvirt that supports this behavior? 

It sounds like you can take snapshots but not merge them back while your 
domain is online, because your qemu is too old. But you can use 
'qemu-img' to do offline merging, if having your domain offline is not 
an issue. 

-- 
Eric Blake eblake at redhat.com +1-919-301-3266 
Libvirt virtualization library http://libvirt.org 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120820/fc6bddf3/attachment.htm>


More information about the libvirt-users mailing list