netcat usage sample

This page documents various techniques that people have found useful for transferring disk images to a SAN target.

netcat

If the source machine does only have one HDD which has been used completely, netcat can be used to transfer the image to the target in one step:

 

 On the storage Server:
 nc -l -p 30000 | dd of=/path/to/image/file.img
 On the Netboot-Box:
 dd if=/dev/sdX bs=8225280 count=1825 | nc <SAN-IP> 30000

 

This command will extract the same portion of the disk directly to the server. The Port (30000) can be chosen free but has to be the same on both sides.

你可能感兴趣的:(sample)