[libvirt-users] KVM incremental backup using CBT

Eric Blake eblake at redhat.com
Sat Oct 11 01:32:06 UTC 2014

On 10/10/2014 11:37 AM, Jd wrote:
> Hi
>     Looking in to implementing (CBT like) delta backup for KVM.

Not quite sure what you mean by CBT.

>     The following looks promising..(last paragraph)
>      http://wiki.qemu.org/Features/Snapshots2

Libvirt hasn't yet been patched to take advantage of all the latest qemu
features.  Patches are welcome.  But libvirt already knows how to create
external snapshots and do blockpull (backing files pulled into the
active image so the backing isn't needed any more) and commit (active
files pushed into the backing files), and even though it is not as
full-featured as where we'd like to get, it can already do quite a bit.

>      * In the last para, there is a mention of copy the blocks from the
> disk using dirty-bitmap as reference. How to accomplish this ?
> block-mirror with bitmap or is there a qemu-img command ? some details
> would be appreciated.

block-backup is a new QMP command that libvirt would need to expose; I
don't know whether it is better to overload the existing
virDomainBlockCopy() API for it, or to add a new API.

> // backup software now reads foo.img using t0_dirty.dbmp to perform
> incremental backup, when finished
>      * The backup after few runs in the backup store would be base image
> + bunch of delta blocks ? Will this be same as base disk and bunch of
> deltas ? or there is some special way to merge these ?
>      * I am assuming this scheme (snapshot, bitmap, block merge etc.)
> should work with base disk in raw (non-qcow) format as well ? Right ?
> i.e. will it work when the storage disk is iscsi, lvm, fc ? std linux
> block device?

Yes, you can use qcow2 to store deltas on top of any underlying storage

>      * Are there libvirt-api/verbs for doing some of this or we will
> have to sue the qemu-monitor-command ?

If you come up with a scenario where the only way to do something is via
a raw qemu-monitor-command, please report it as a bug (or better yet
provide a patch) so that a stable libvirt API can be written to do the
same task.

>      * What version of qemu/kvm will have the core capabilities and
> which min libvirt version would be sufficient ?

Until patches materialize, it's hard to predict the future.

>      Is there a better way to do incremental backup / CBT like backup
> than one mentioned here ?
> Thanks
> /Jd
> _______________________________________________
> libvirt-users mailing list
> libvirt-users at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20141010/accbf6c4/attachment.sig>

More information about the libvirt-users mailing list