Skip to content

Instantly share code, notes, and snippets.

@ctavan
Created July 20, 2012 09:11
Show Gist options
  • Save ctavan/3149764 to your computer and use it in GitHub Desktop.
Save ctavan/3149764 to your computer and use it in GitHub Desktop.
Cloning harddisks over the network using dd and nc
# clone harddisk from one machine to harddisk on another machine over the network
# on the target:
nc -l -p 7000 | gunzip | dd of=/dev/sda &
# on the source:
dd if=/dev/sda | gzip | nc <TARGET_IP> 7000 -q 10 &
# progress (on the source):
# get pid
pgrep dd -l
# get stats
kill -USR1 <PID>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment