[nflug] speed imaging netcat

Bradley A. Llewellyn bllewellyn at gmail.com
Mon Nov 3 13:32:51 EST 2008


If you want to be able to watch the progress, you can get fancy with 
"pv" and "dialog".  I used this to transfer an Innotek VirtualBox disk 
drive to a file server:

(pv vpc1.vdi -n | gzip -c1 | netcat fileserver 1234) 2>&1 | dialog 
--gauge "Transferring file..." 7 70

The key is the "-n" on the pv command.  It outputs a percentage to 
"standard error" (handle '2'), then you redirect '2' to '1' and pipes it 
through "dialog".  "7 70" is just the dimensions of the dialog box.

--Brad L.

Eric Benoit wrote:
> *I'm trying to image a ssd drive across the network to my hard drive, 
> I used the directions below and everything is working fine, however it 
> is slow as time next to a blackhole ;)
>
> does anyone know a way I could speed things up a bit or byte?
>
>
> based on the following instructions:
> *
>
> This method uses dd and nc provided by the Debian Installer and 
> another computer located on your local network:
>
>    * First, boot the debian installer on your USB disk
>    * Then be sure to activate network and configure it, same thing for
>      the disk (Do not partition it)
>    * Open a console shell (Alt+F2 or from the Debian Installer menu)
>    * On the backup computer:
>          o get its IP adress (ifconfig)
>          o start a listening nc session on port 9000:
>
> nc -l -p 9000 | gzip -1 -c > ./eeepc.img.gz
>
>    * With netcat-openbsd installed this line should read
>
> nc -l 9000 | gzip -1 -c > ./eeepc.img.gz
>
>    * On the EeePC shell:
>
> dd if=/dev/sda | nc -w 5 computer_ip_adress 9000
>
> Wait some minutes (about 35)... and you get a eeepc.img.gz with about 
> 900Mb
>
> from the website:
> *
> http://tinyurl.com/5hozkf
>
>
> Thank you,
> Eric
> *
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list