Page 1 of 1

dd via network with netcat

Posted: Sun May 01, 2022 11:26 am
by xeno74
Hi All,

I was able to copy the complete MintPPC partition with dd and netcat via network from the X5000 to the X1000 today.

Commands:

X1000:

Code: Select all

# netcat –l -p 4444 | dd of=/dev/sda4
X5000:

Code: Select all

# dd if=/dev/sda3 | netcat 192.168.178.130 4444
X1000: dd output:

Code: Select all

587915266+178988059 records in
726319104+0 records out
371875381248 bytes (372 GB, 346 GiB) copied, 33611.8 s, 11.1 MB/s
X5000: dd output:

Code: Select all

726319104+0 records in
726319104+0 records out
371875381248 bytes (372 GB, 346 GiB) copied, 33598.4 s, 11.1 MB/s
X1000:

Code: Select all

e2fsck -f /dev/sda4
Output:

Code: Select all

e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Inode 7168083 extent tree (at level 1) could be shorter.  Optimize<y>? yes
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

MintPPC32: ***** FILE SYSTEM WAS MODIFIED *****
MintPPC32: 584523/22567024 files (0.6% non-contiguous), 24005601/90789888 blocks
X1000:

Code: Select all

# resize2fs /dev/sda4
Output:

Code: Select all

resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on /dev/sda4 to 319655862 (4k) blocks.
The filesystem on /dev/sda4 is now 319655862 (4k) blocks long.
X1000:

Code: Select all

e2fsck -f /dev/sda4
Output:

Code: Select all

e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
MintPPC32: 584523/79452864 files (0.6% non-contiguous), 27576720/319655862 blocks
Cheers,
Christian

Re: dd via network with netcat

Posted: Mon May 02, 2022 8:04 am
by sailorMH
nice!
fast and easy.

Re: dd via network with netcat

Posted: Tue Oct 11, 2022 7:53 am
by xeno74
For Debian Sid:

Code: Select all

# apt install netcat-traditional

Code: Select all

# netcat -p 4444 -l | dd of=/dev/sda4