- plug the harddisk to mac
- use Terminal
- use "diskutil list" to find the new harddisk
- use "diskutil unmount /dev/diskX "
- mac "ssh -l user yourserver.com" to set sudo dd without password (omitted)
- mac "sudo" to enter password for dd
- ssh -l user yourserver.com "sudo /bin/dd if=/dev/sda" | dd of=/dev/disk2
- Rest and wait
To monitor dd progress, Command + T to open new terminal tab
-While dd is executing, run this in another terminal:
while pgrep ^dd; do sudo pkill -INFO dd; sleep 1; done
It prints the dd status every 1 second in the original terminal window where dd is executing, and quits when the command is done.