I have a series of unmounted lv's that are used in xen vm's of various flavors in a lab environment. I made a script that I use to backup all of them prior to doing anything I may need to undo and all I execute is:
dd if=/dev/vgname/lvname of=/dir/name.img
Are there any additional parameters I should use? I haven't tried to restore this into an lv, but I did swap the 'phy' specification for 'file' and started a vm using the backed up image and it was fine.
Thanks! jlc
Joseph L. Casale wrote on Mon, 21 Apr 2008 21:07:00 -0600:
dd if=/dev/vgname/lvname of=/dir/name.img
if you want to save space you could gzip/b2zip them
dd if=/dev/vgname/lvname | gzip > /dir/name.img.gz
Kai