15

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?

2
  • I moved my data and the command worked like a charm. I checked some sample data with MD5 and everything was ok, except for the iPhoto folder, where I had the right size but many more files than expected. I suspect there are some links that where not handled correctly. Apr 7, 2013 at 18:16
  • If you happen to do this again, consider Truck.app. I wrote it to make rsync as easy as 'drag and drop'. It has good default options, but if you need to, you can get right down there in the engine bay and tune everything :) check it out if you want bonhardcomputing.com/truck
    – dave
    Jan 30, 2019 at 1:21

2 Answers 2

8

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

2
  • 1
    I know this is an old posting, but it helped greatly. Worth mentioning the command is to be run from the destination, not the source... unless you switch around the commands (which I stupidly didn't realize at first). Gotta love backups! ;) Aug 15, 2019 at 19:34
  • @IncredibleHat I read your comment after I got into it myself 😅
    – Roman
    Apr 8, 2022 at 13:40
3

Turns out blowfish and arcfour were disabled by default for security reasons (as of OpenSSH 6.7), so the above suggestion no longer works.

However, the good news is you can use one of your system's secure ciphers instead.

To see a list, run: ssh -Q cipher and then use the one of your choosing:

rsync -azvP --progress -e "ssh -c <insert-cipher-here>" user@hostname:/source /destination
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .