Partition Cloning Over Network

Copy disk layout stored in MBR if needed:

Start Netcat receiver on the destination (10.0.0.1) and reread MBR after copying is finished:
nc -l -p 1234 > /dev/sda
partprobe /dev/sda
And send first 512 bytes from the source:
dd if=/dev/sda bs=512 count=1 | nc 10.0.0.1 1234
Copy desired partition:

Start Netcat receiver on the destination again:
nc -l -p 1234 > /dev/sda1
And send partition raw data over the wire:
dd if=/dev/sda1 | nc 10.0.0.1 1234

No comments:

Post a Comment