Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running KVM on Debian Squeeze and have VMs ranging from Debian to Windows Server 2003 to XP and W7

My plan is to move these VMs to qcow2 and use libvirt's snapshot-create to take periodic snapshots and rsync to copy the images to a remote site. I am happy to lose the running state and all changes since the last snapshot - this is only part of the overall backup strategy.

  • Am I right to assume I need to take an underlying LVM snapshot and run rsync from that to avoid corruption?
  • Will rsync efficiently copy only the tail-end of the image file that has changed since the previous rsync?
share|improve this question

1 Answer 1

up vote 1 down vote accepted

LVM snapshot are required if you can't pause for a few minutes running VMs during the backup procedure. If isn't critical for your applications, for every VM, you can freeze it when the backup procedure starts, rsync its virtual disk where you like, and finally resume it.

Rsync is a great tool, but keep in consideration that keeping incremental backups is generally more "secure" than keeping a daily rsynced copy: I use a combo of a shell script to rsync disk images, and a centralized backuppc server that acquire incremental backups of VM files (internal, not the disk images).

share|improve this answer
    
thanks, yes I'm using rsnaphot for files and rsync for the VMs themselves. I hadn't thought of just freezing them for the duration - that may well be possible. –  Jack Douglas Oct 16 '11 at 19:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.