|   xen-users
[Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup) 
| >  Is there a way to get a complete image out of an LVM? The only way I found
> to extract files from an LVM snapshot was to mount it, but when you do that
> you are mounting a badly corrupted file system, and trying to take backup
> from it.
I think you should just be able to backup the device file that you'd usually 
mount.  Just treat the snapshot's device file as *the* file to backup.
> Of course, mounted incremental backups leads to greater 
> flexibility, much faster storage etc, but if you can tell me a way to get
> the image out of an LVM, then that would suffice for now, and considering
> that rsync has a nice protocol, it might even be faster, since it doesn't
> have to check so many files. We have to keep taking binary diffs to have
> multiple incremental copies.
Take a look at: http://www.nongnu.org/rdiff-backup/
If you can find a configuration that works for you, rdiff-backup will do 
point-in-time backups for you.  You'll want the device file name for the LVM 
snapshot to be the same each time so it knows it needs to do a binary diff of 
the contents.
The simple way to do this would be to dd the data from the LVM device (a bit 
slow, but it's not on the critical path):
rm /backup/temp/*
xm save guest /backup/temp/gueststate.save
do LVM snapshot
xm restore /backup/temp/gueststate.save
dd if=/dev/thelvmsnapshotdevice of=/backup/temp/guestdisk
rdiff-backup /backup/temp/ /backup/my-vm-history/
destroy LVM snapshot device
repeat for next VM
This will create a historical record of guest memory and disk states 
in /backup/my-vm-history, which will allow you to check out a consistent 
guest memory / disk state from the most recent backup from any point in time.
This is just an example.  Obviously the dd stage copies the entire contents of 
the device file, which is not ideal - it's time consuming and wasteful in 
storage bandwidth.  A more clever setup would seek to eliminate this and do 
the binary diffing directly as the data is pulled off the snapshot device.
Might be possible to do that by clever configuration, and certainly would be 
possible with a little hacking of rdiff-backup itself.  The resulting 
software would be ideal for maintaining point-in-time guest checkpoints - 
very cool.
Btw, another checkpointing patch has been posted on xen-devel (eliminating the 
need to do a restore of the guest after the snapshot)
Cheers,
Mark
-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
 | 
 
| <Prev in Thread] | Current Thread | [Next in Thread> |  | 
Re: [Xen-users] Re: 100% safe way to backup domU:, (continued)
Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Nico Kadel-Garcia
Message not available[Xen-users] Re: 100% safe way to backup domU:, Ligesh
Re: [Xen-users] Re: 100% safe way to backup domU:, Tim Post
Re: [Xen-users] Re: 100% safe way to backup domU:, Goswin von Brederlow
[Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Ligesh
Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Tim Post
Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Tom Mornini
[Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Ligesh
[Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup),
Mark Williamson <=
Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Nico Kadel-Garcia
Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Mark Williamson
Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Nico Kadel-Garcia
[Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Ulrich Windl
[Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Ligesh
Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Ulrich Windl
[Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Ligesh
Re: [Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Nico Kadel-Garcia
[Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Ligesh
[Xen-users] Re: 100% safe way to backup domU: (was Yet another	backup), Ulrich Windl
 |  |  |