User Tools

Site Tools


gentoo:netcat_disk_copy

This is an old revision of the document!


Netcat disc copy

Copy an entire partition

The client is a computer with ip 192.168.0.10.

The client (the computer on which the image is to be stored) must run the following as someuser:

nc -l -p 10000 > partition.bz2

The server (the computer on which the disc to be copied resides) must run the following as root:

dd if=/dev/hda1 | bzip2 -9 | nc -q 0 192.168.0.10 10000

Copy all files on a filesystem

The client is a computer with ip 192.168.0.10.

The client (the computer on which the image is to be stored) must run the following as someuser:

nc -l -p 10000 > files.tar.bz2

The server (the computer on which the disc to be copied resides) must run the following as root:

tar --preserve cvj . | nc -q 0 192.168.0.10 10000

Copy all files on a filesystem without compression

The client is a computer with ip 192.168.0.10.

The client (the computer on which the image is to be stored) must run the following as someuser:

nc -l -p 10000 > files.bz2

The server (the computer on which the disc to be copied resides) must run the following as root:

tar --preserve cv . | nc -q 0 192.168.0.10 10000
gentoo/netcat_disk_copy.1264498554.txt.gz · Last modified: 2010/01/26 10:35 by deva