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 got a Ubuntu (hardy) system used for virtualization using KVM. Each guest got it's own qcow2 file used as disk. Guests are running Ubuntu (hardy). What would a good backup strategy be for such a setup? I would prefer not to shutdown the guests during backup.

share|improve this question
add comment

2 Answers

You'll want to coordinate that within the guest .. ideally you:

  1. Cause any RDBMS running in the guest to flush its cache
  2. Tell Linux to sync disks (sysrq S or just type 'sync')

Then just make a qcow2 snapshot of the guest. You then have a read-only immutable copy of the guest FS as it was when you took the snapshot.

This page offers a lot more information than you probably wanted to know on how snapshots (and qcow2 itself) works. See also the accepted answer to this question.

share|improve this answer
    
Can I do the snapshot "online"? Do you know of any tools that can help? –  rkthkr Oct 27 '09 at 9:34
add comment

I was looking for similar solution, now I'm using software RAID+LVM2 volume for libvirt storage, I've taken a snapshot and few times (about 8-10) I had to revert to backup and it worked, even if Win guest said: unclean shutdown. I'm not using hardware RAID anyway, software is enough but prorably SCSI/SAS + HW RAID + battery backup is the best solution for LVM2 snapthots (due to double write to different places on hard disks when snapshot is taken). I always use full-filled RAW volume files or even direct attached drive/partition, recenty I've enabled write cache for VMs drives which increased write speed A LOT! Now I'm considering QCOW2's built-in snapshots to turn off LVM2, becouse it's very slow when compared to RAW partition, like EXT4.

share|improve this answer
add comment

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.