ゴジラ

Backing up a LV to a remote location via SCP

note Before you try this, ensure that the LV isn't in use, for eg, if a VM uses the logical volume, ensure that the VM is shutdown first.

Using PV to report progress

PV is a very useful tool to report progress as DD doesn't report any progress while running. DD on large LVs can take a long time and knowing how long is important, hence PV.

On Debian or Ubuntu

apt-get install pv

On RHEL/CentOS,

yum install pv

note You may need EPEL repository enabled on CentOS first, enable it with,

yum install epel-release

and then try installing PV

Backing up the logical volume

In the command below,

Finally we get,

dd if=/dev/vg/lv_img | pv | ssh user@remote.host 'gzip --fast > lv_img.gz'

Last modified: December 06 2019 14:21:55