copy block device over ssh

ssh root@remote_server "dd if=/dev/vda " | dd of=/root/remote_vda.img
mkdir /mnt/fs
mount -o loop /root/remote_vda.img /mnt/fs

ls -la /mnt/fs

or maybe you should use rsync if available:

rsync -vP --inplace --copy-devices root@remote_server:/dev/vda /root/remote_vda.img

Leave a Reply

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