Hello. Is someone performing incremental backups via libvirt for qemu/kvm machines? I'm still having a hard time to find a nice procedure. I mean is it possible to make a full backup of an image on monday a do the next days of the week incremental backups? Another way could be mount the image and rsync its contents. Does that makes sense? Also i read in qemu changelog: --- Support for a new block device background job. Started by drive-backup, it will backup a disk's content to a new file. Unlike drive-mirror, the new file will include the source disk's content at the time the backup job was started. Atomic backup of multiple disks is supported using the "transaction" QMP command. --- Is this supported by libvirt? thanks and best regards thomas
Hi Thomas, I'm using this script which leverages external snapshots and blockpull: https://github.com/dguerri/LibVirtKvm-scripts It's very simple and on ubuntu requires some tweaks on apparmour configuration. Hth Cheers, Davide -- Davide Guerri http://about.me/davide_guerri> On 20 Sep 2013, at 15:31, Thomas Stein <himbeere@meine-oma.de> wrote: > > Hello. > > Is someone performing incremental backups via libvirt for qemu/kvm machines? I'm still having a hard time to > find a nice procedure. I mean is it possible to make a full backup of an image on monday a do the next days of the week > incremental backups? > > Another way could be mount the image and rsync its contents. Does that makes sense? > > Also i read in qemu changelog: > > --- > Support for a new block device background job. Started by drive-backup, it will backup a disk's content to a new file. Unlike drive-mirror, the new file will include the source disk's content at the time the backup job was started. Atomic backup of multiple disks is supported using the "transaction" QMP command. > --- > > Is this supported by libvirt? > > thanks and best regards > thomas > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users
On 2013-09-20 15:41, Davide Guerri wrote:> Hi Thomas,Hello Davide.> I'm using this script which leverages external snapshots and > blockpull: https://github.com/dguerri/LibVirtKvm-scriptsYeah. I saw that and tried this already. But it needs to be adjusted to libvirtd-1.1.2 i think. Can you do this? I fiddled a litte bit around but wasn't realy successfull. hn LibVirtKvm-scripts # ./fi-backup.sh -b /opt/virt-backup-local/ -d serve.lordcritical [DEB] qemu-img version '1.6.0' is supported [DEB] KVM version '1.6.0,' is supported [DEB] Snapshot for domain 'serve.lordcritical' requested [DEB] Using timestamp '20130920-151742' [DEB] Snapshotting block devices for 'serve.lordcritical' using suffix 'bimg-20130920-151742' [VER] Snapshot for block devices of 'serve.lordcritical' successful [ERR] Error getting backing file for '/var/lib/libvirt/images/serve.lordcritical.bimg-20130920-151742'. At the moment i try: https://bitbucket.org/guilhemfr/virt-back cheers t.> It's very simple and on ubuntu requires some tweaks on apparmour > configuration. > > Hth > > Cheers, > Davide > > -- > > Davide Guerri > http://about.me/davide_guerri > >> On 20 Sep 2013, at 15:31, Thomas Stein <himbeere@meine-oma.de> wrote: >> >> Hello. >> >> Is someone performing incremental backups via libvirt for qemu/kvm >> machines? I'm still having a hard time to >> find a nice procedure. I mean is it possible to make a full backup of >> an image on monday a do the next days of the week >> incremental backups? >> >> Another way could be mount the image and rsync its contents. Does that >> makes sense? >> >> Also i read in qemu changelog: >> >> --- >> Support for a new block device background job. Started by >> drive-backup, it will backup a disk's content to a new file. Unlike >> drive-mirror, the new file will include the source disk's content at >> the time the backup job was started. Atomic backup of multiple disks >> is supported using the "transaction" QMP command. >> --- >> >> Is this supported by libvirt? >> >> thanks and best regards >> thomas >> >> _______________________________________________ >> libvirt-users mailing list >> libvirt-users@redhat.com >> https://www.redhat.com/mailman/listinfo/libvirt-users
Hi Davide,> Hi Thomas, > I'm using this script which leveragesexternal snapshots and blockpull: https://github.com/dguerri/LibVirtKvm-scripts [1]> > It's very simpleand on ubuntu requires some tweaks on apparmour configuration. Would it be hard to adapt this script for LVM-backed VMs? []s, Fernando Lozano Links: ------ [1] https://github.com/dguerri/LibVirtKvm-scripts
Le vendredi 20 septembre 2013 à 15:31 +0200, Thomas Stein a écrit :> Hello. > > Is someone performing incremental backups via libvirt for qemu/kvm > machines? I'm still having a hard time to > find a nice procedure. I mean is it possible to make a full backup of an > image on monday a do the next days of the week > incremental backups?You can take a look at this script: http://gitweb.firewall-services.com/?p=virt-backup;a=blob_plain;f=virt-backup;hb=HEAD I'm using it on several servers. You can either take a full backup (raw dd of your LV), or incremential backups. Incrementials are done this way: - pause the VM - take an LVM snapshot of each of its disk - resume the VM - use chunkfs to mount the LVM snapshots as if it was a lot of small files - now you can rsync the fuse mount point using rsync, and only modified blocks will be transfered. If you use something like BackupPC or rsnapshot, it'll also only store on disk the modified blocks Regards, Daniel> > Another way could be mount the image and rsync its contents. Does that > makes sense? > > Also i read in qemu changelog: > > --- > Support for a new block device background job. Started by drive-backup, > it will backup a disk's content to a new file. Unlike drive-mirror, the > new file will include the source disk's content at the time the backup > job was started. Atomic backup of multiple disks is supported using the > "transaction" QMP command. > --- > > Is this supported by libvirt? > > thanks and best regards > thomas > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users-- Daniel Berteaud FIREWALL-SERVICES SARL. Société de Services en Logiciels Libres Technopôle Montesquieu 33650 MARTILLAC Tel : 05 56 64 15 32 Fax : 05 56 64 15 32 Web : http://www.firewall-services.com
Am 23.09.13 16:00, schrieb Daniel Berteaud:> Le vendredi 20 septembre 2013 à 15:31 +0200, Thomas Stein a écrit : >> Hello. >> >> Is someone performing incremental backups via libvirt for qemu/kvm >> machines? I'm still having a hard time to >> find a nice procedure. I mean is it possible to make a full backup of an >> image on monday a do the next days of the week >> incremental backups? > > You can take a look at this script: > http://gitweb.firewall-services.com/?p=virt-backup;a=blob_plain;f=virt-backup;hb=HEADHello Daniel. Thank you but unfortunately i don't have a LVM setup. cheers t.> I'm using it on several servers. You can either take a full backup (raw > dd of your LV), or incremential backups. Incrementials are done this > way: > > - pause the VM > - take an LVM snapshot of each of its disk > - resume the VM > - use chunkfs to mount the LVM snapshots as if it was a lot of small > files > - now you can rsync the fuse mount point using rsync, and only modified > blocks will be transfered. If you use something like BackupPC or > rsnapshot, it'll also only store on disk the modified blocks > > > Regards, Daniel >> >> Another way could be mount the image and rsync its contents. Does that >> makes sense? >> >> Also i read in qemu changelog: >> >> --- >> Support for a new block device background job. Started by drive-backup, >> it will backup a disk's content to a new file. Unlike drive-mirror, the >> new file will include the source disk's content at the time the backup >> job was started. Atomic backup of multiple disks is supported using the >> "transaction" QMP command. >> --- >> >> Is this supported by libvirt? >> >> thanks and best regards >> thomas >> >> _______________________________________________ >> libvirt-users mailing list >> libvirt-users@redhat.com >> https://www.redhat.com/mailman/listinfo/libvirt-users >