Re: KVM incremental backup using CBT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Kashyap,
The command line examples makes thing quite clear :)
rsync for image (large) files create a new file for every little change, that was the reason I started looking in to using dirty bitmaps.

/Jd

On 10/11/14, 1:13 AM, Kashyap Chamarthy wrote:
On Fri, Oct 10, 2014 at 07:32:06PM -0600, Eric Blake wrote:
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.
To expand an example of what Eric wrote here about external snapshots,
some commands to try:

1. Check the current acitve disk image in use:

     $ virsh domblklist vm1


2. Create an external live snapshot:

     $ virsh snapshot-create-as --domain vm1 sn1 \
         --diskspec vda,file=/export/images/sn1.qcow2 \
         --disk-only --atomic --no-metadata

     Note (thanks Eric Blake): Above, if you have QEMU guest agent
     installed in your virtual machine, try --quiesce option with
     'snapshot-create-as' to ensure you have a consistent disk state.

     Now, you have a disk image chain:
base <-sn1 (live QEMU)


3. Take a backup of the original disk in backround:

     $ rsync -avh --progress /export/images/base.img \
         /export/images/copy.img


4. Commit the sn1 contents back into base:

     $ virsh blockcommit vm1 vda --active --verbose --pivot

     Now, the chain is:
base (live QEMU)

     with contents from sn1 live committed into base.


5.  Check the current acitve disk image in use again:

     $ virsh domblklist vm1



_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux