Copy Image via netcat

This is for a High-Bandwidth Network. If you have a Low-Bandwidth Network you can try to switch lzo with bzip2.

nc -v -l -p 19000 | lzop -c -d | pv -s 70G | dd bs=16M of=/root/foo.img

  1. listen on port 19000 for connections.
  2. decompress the datapackages.
  3. pv displays a status bar.
  4. and wirte them into a file.

dd bs=16M if=/root/bar.img | lzop -3 -c | nc -v 10.0.01 19000

  1. dd reads the file in 16MB Blocks.
  2. each block will be compressed with lzo.
  3. nc connects 10.0.01 on port 19000 and pushes data.