WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] cloning guests between Dom0's ?

John Haxby wrote:

For a LVM LV you can do the following (using the LVM snapshot) without shutting down the domU:

lvcreate -s /dev/vg/domU -L1G -n domU_snap
mkdir /mnt/domU_snap
mount /dev/vg/domU_snap /mnt/domU_snap
tar cvjpf /storage/path/domU_snapshot.tbz /mnt/domU_snap
lvremove /dev/vg/domU_snap

Is this correct ? I know the LVM snapshot will give you a "point in time" image, but won't the DomU have unwritten changes in it's cache - giving you a very unclean filesystem ?

You probably want to use kpartx on the snapshot and mount the right partition for backups. However, as you'll say, you'll probably come unstuck when you try to mount the file system because it will be corrupt. You need to cooperation of both the OS and any running applications in the domU for this approach to work. A good way to get everything consistent for backing up is to shut down the guest OS, take the snapshot and the re-start the guest OS. Or at least have the guest unmount the file system(s) you're going to back up before you take the snapshot.

Backing up data from a machine (physical or virtual) is surprisingly difficult unless you can enlist the help of the machine. It's almost always easier to do it from within the machine.

Just checking I hadn't missed something !

I agree, it's a lot easier to just do it from within the client, or to shut the client down.


--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users