Best rsync options to transfer data between two Mac

backupdata transferterminal

I am about to move my data from my old iMac to a brand new MacBook Pro. I would like to start over with a fresh install on B and copy just a subset of my data, reinstalling applications from scratch, so I am not considering using Migration assistance.

I am thinking to use rsync to do the job, but I am confused about which options I should use.

Reading man pages, I came out with this:

rsync -vazHE --progress -e ssh andrea@imac:/remote/dir /local/dir/ 2> errors.log
  • v: verbose
  • a: archive, to keep times, symlinks, permissions, groups, owners and traverse directories recursively
  • z: to compress data
  • H: to keep any hard-link
  • E: to keep extended attributes
  • progress: to keep an eye on job progress

Am I not considering some other useful options?

Best Answer

Personally, I'd be inclined to drop the z switch. Compression is only really useful over very slow connections (mobile data, dial-up) as the CPU is likely to become the bottleneck. I've certainly seen a drop in throughput with compression enabled.

Assuming your network is trusted, you would do well to use a more efficient, but perhaps less secure SSH cipher as this will probably speed up the operation a little (it certainly helps with VNC over SSH, or X11 forwarding over SSH).

  • Run ssh -Q cipher on both systems and pick a cipher common to both
  • Use it with rsync -vhaHE --progress -e "ssh -c aes256-cbc" andrea@imac:/remote/dir /local/dir/ 2> errors.log

PS: I also use the -h switch to get more human readable numbers in MB/s as opposed to b/s