Skip to content

Instantly share code, notes, and snippets.

@jwilkins
Created October 10, 2011 14:50
Show Gist options
  • Save jwilkins/1275507 to your computer and use it in GitHub Desktop.
Save jwilkins/1275507 to your computer and use it in GitHub Desktop.
clone/copy remote drives
ssh user@host "tar -zc --one-file-system -f - /" > host-partition-date.tar.gz
ssh user@host "dd if=/dev/sda | bzip2" > host-sda.dd.bz2
# http://cb.vu/unixtoolbox.xhtml
server# dd if=/dev/da0 | nc -l 4444 # Server partition image
client# nc 192.168.1.1 4444 | dd of=/dev/da0 # Pull partition to clone
client# nc 192.168.1.1 4444 | dd of=da0.img # Pull partition to file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment