[CentOS-virt] About doing backups with kvm guests

Kenni Lund

kenni at kelu.dk
Sun Dec 13 00:54:28 UTC 2009

2009/12/12 Christopher G. Stach II <cgs at ldsys.net>:
> ----- "Kenni Lund" <kenni at kelu.dk> wrote:
>> I'm also very interested in how to make backups of Windows guests on
>> LVM. But will the shadow copy feature in amanda not only backup the
>> files within the Windows machine? I don't think I fully understand
>> the
>> method - How do you then do a full restore, eg. with no working
>> Windows machine? Would you then have to do a clean install of Windows
>> in order to get the partition and bootloader setup correctly, after
>> which you can do the restore by overwriting all files?
> You can just shut down the VM, make a snapshot, start the VM, dd the snapshot, and finally drop the snapshot.
> Or, if that's too much downtime, you can xm save, snapshot, copy save dumpfile, xm restore, dd snapshot, backup dumpfile, and clean up.
> If that's too much downtime, you can xm pause, snapshot, xm unpause, etc., but you will have issues with your restore because it will look like the VM crashed and you may or may not lose data.

Yeah, that's the problem. AFAIK if I want to take advantage of using
LVM directly for Windows guests, I'll have to do a full dump with dd
of the image/snapshot, including any unused bits...eventually combined
with some compressing, but still. If I use a Linux filesystem on top
of LVM and store the Windows guest in an image on this filesystem, the
overall I/O performance will be lower, but I'll only have to backup
data which are actually in use, due to sparse mode and/or the qcow2
image format (I'm using KVM). This is quite relevant if some machines
have 200GB allocated HDD space, but only actively uses 30GB.

> Personally, I only back up data and never have useful data on a Windows installation volume (or even a native Windows volume, if I can help it). I can reimage a Windows machine with a single command and it only takes a few minutes. (Hint: use Sysprep.) Besides, reinstalling Windows machines is better than restoring them since they progressively bit rot.

I agree, I already have backups of the important data, but some of
these machines runs some old legacy software, which I for sure don't
want to setup again unless it's extremely critical. Also, what I want
is a minimal monthly full backup of each virtual machine, from which
any of my (less technical) colleagues can restore to another physical
server by following some simple guidelines.

I think I'll stick with the extra layers (filesystem+image) for now to
keep the setup simple and to keep the backups small. But thanks for
your input.

Best Regards
Kenni Lund

More information about the CentOS-virt mailing list