dd over ssh / netcat

Nice trick to run dd over ethernet:

dd bs=16M if=/dev/sdX | gzip | nc server 1000

nc -l -p 1000 | gunzip | pv | dd bs=16M of=/dev/sdX

or via ssh:

dd bs=16M if=/dev/sdX | gzip | ssh user@server "gunzip | dd bs=16M of=/dev/sdb"

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.