Clone hard disk over network

Posted: 2007-11-24. Updated: 2013-03-23.

What: Cloning a hard disk using an IP network and only standard Unix tools, such as dd and nc (abbreviation for netcat).
Purpose: When upgrading your hard disk you usually want to clone the original content on the old disk onto the new disk.

Cloning a hard disk drive (hdd) via an IP network using only standard Unix tools like dd and nc is really easy, straightforward and well documented. However there are some small, but grave difficulties to be aware of, which are usually not mentioned elsewhere.

Client: Computer where the hdd needs to be cloned.
Server: Computer with enough hdd space to host a full disk image of Client's old hdd. Reachable via IP network.

So remember to set the option "-w $Wait"!

Here we chose $Wait to be an arbitrarily large timeout of 300 seconds to be on the safe side. Otherwise the data transfer back onto Client's new hdd stops unexpectedly and reproducible at around 80% (32GB) when using our LAN and even while directly connected. This caused serious head scratching, quite some wasted time and it is still a bit unclear to us why this option is needed on such a fast connection. Feel free to enlighten us.

To increase the partition size after the cloning onto the new and probably larger disk, the live CD of GParted worked well.

Back to writings.