Tuesday 15 April 2014

Using dd to copy multiple files or disks to a remote system

Using dd to copy multiple files / raw disks to a remote system

Let us say we have raw disks at server A and we want to copy the disks to server B

here are the steps

login to the server A and go to the directory

serverA001 # cd /dev/disks/
serverA001 # ls | while read i
> do
> dd if=$i ibs=4096 conv=notrunc,noerror | (ssh 172.02.129.198 dd of=/dev/disks/$i obs=4096)
> echo $i
> done


You need to enter the user password of the remote host to copy the files.