lvm snapshot to remote server

lvdisplay /dev/lvm-group/lv-name | grep Size
LV Size 60.00 GiB

take 10-20% of this space:
lvcreate –size 7G –snapshot –name lv-name-snap /dev/lvm-group/lv-name

copy and compress:
dd if=/dev/lvm-group/lv-name-snap | gzip -1 - | ssh root@storage.server.local dd of=/backups/lvm-images/lv-name-snap.gz

from backup server:
ssh user@remote "dd if=/dev/lvm-group/lv-name-snap | gzip -1 -" | dd of=/backups/lvm-images/lv-name-snap.gz

remove snapshot image:
lvremove /dev/lvm-group/lv-name-snap

Please be carefully with dd command, this command can be destructive.

Views All Time
Views All Time
287
Views Today
Views Today
1

Leave a Reply

Your email address will not be published. Required fields are marked *