[kwlug-disc] Was cronjob / btrfs scrup [Was: Re: What is all this about systemd?]

Khalid Baheyeldin kb at 2bits.com
Tue Oct 28 13:24:10 EDT 2014


On Tue, Oct 28, 2014 at 1:13 PM, B.S. <bs27975 at yahoo.ca> wrote:
> I've recently started wondering about how to back up a vm, live. i.e.
> Assuming one leaves a vm up 24/7, and wanting an instant restore (vs backing
> up the vm from within the vm, be it rsync and/or mondoarchive). In essence,
> if the machine or disk goes down, light up the backup copy of the vm and get
> on with figuring out what happened to the original.

I did snapshots for both VirtualBox and KVM (via libvirt, which will
be the core of the presentation Monday).

VirtualBox snapshots worked fine. KVM snapshots work fine too, but are
slow. It was faster to backup the raw disk and then copy it to the
working disk with the VM down. Not a true snapshot, since you start
where you started, but faster for my purposes. Also, less backup (4GB
disk images add up quick).

>
> If the 'backup' lands on an external (eSata) disk, then presumably I just
> move the disk to another machine upon original machine failure and turn on
> the vm there.

Yes, provided you are using KVM/libvirt and export the XML and import
it to the other machine. Also, any network customizations, ...etc.

>
> From my initial poking, vbox can't do this [but can if the vm is taken down
> first]. Seems that an extra-vm facility is needed, such as a btrfs or lvm
> snapshot.

Can't comment on the btrfs/lvm part. But I found that VirtualBox
refuses to start on a copied disk image, because it identifies them by
a UUID, which is a pain. KVM does not have that restriction, and it
just points to a regular Linux path for the image. It does not care if
you swap.


-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple,
and wrong." -- H.L. Mencken





More information about the kwlug-disc mailing list