Interview Prep/Linux/Networking, SSH and remote access

You need to copy a 500 GB directory between two servers on a 1 Gbps link as fast as possible. What do you use?

IntermediateScenarioNetworking, SSH and remote access
Answer

Situation read → Throughput and resumability matter.

What I'd do →

rsync -aHAX --info=progress2 --partial -e "ssh -T -c [email protected] -o Compression=no" /data/ dst:/data/

For many small files, parallelise: ls /data | xargs -P4 -I{} rsync -aHAX /data/{} dst:/data/. On a trusted network, tar | mbuffer | nc avoids encryption overhead.

Why → rsync resumes and only sends differences; a fast AES-GCM cipher with hardware support keeps CPU from becoming the bottleneck.

Interview tip → Calculate first: 500 GB at ~110 MB/s is roughly 80 minutes, so set expectations.

All Linux questions Roadmap: Linux

More on Networking, SSH and remote access