Thursday, May 26, 2016

How to export an LVM Volume via ssh if you have no local disk space

Host A has a 40GB Volume but not additional disk space to save the .img to, so you could later copy it somewhere.

You can do this:
dd if=/dev/volumegroup/volumename bs=64k | gzip -c | ssh root@10.0.0.1 'cat > /whereever/volumename.img.gz'

to uncompress the .img do: zcat volumename.img.gz > volumename.img

No comments:

Post a Comment