DEV Community

Cover image for Updating `rsync` on macOS, so you're not stuck with 14 year old software
Sebastian Alsina
Sebastian Alsina

Posted on • Updated on

Updating `rsync` on macOS, so you're not stuck with 14 year old software

rysnc is a very useful command line utility to synchronize folders between locations. You can use it to transfer large folders between drives or remote locations. I use it to deploy Node apps to my Droplet almost everyday.

Unfortunately, macOS (even Big Sur!) ships with version 2.6.9—a version that came out 14 years ago (in 2006).

rsync --version
// rsync  version 2.6.9  protocol version 29
// ...

Fortunately, updating rsync is very easy. We'll use Homebrew (brew.sh) for macOS to do so.

Here's how to do it in 2 steps and 5 minutes.

  1. Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

snippet from https://brew.sh/

  1. Update rsync
brew install rsync

Now, checking the version should return a newer version of rsync. Your version might differ if you're reading this in the future (or the past?).

rsync --version
// rsync  version 3.2.2  protocol version 31
// ...

A grand benefit of updating to a newer version is the implementation of the --info=progress2 flag, which prints the progress of the rsync operation allowing you to ensure the process is working. Extremely useful.

Optionally, you can create an alias, making rsync print with progress every-time. Here's a preset of flags I always use.

alias rsync="rsync -az --info=progress2"

rsync flags and documentation.

Now, enjoy your super-powered rsync on macOS and follow me on Twitter. :)

Top comments (3)

Collapse
 
alberto56 profile image
Albert Albala

Hi there, thanks for this. However, I installed this, and even upgraded rsync, but "rsync --version" still gives me the old version. Please let me know if you have any ideas.

$ brew upgrade rsync
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 1 cask.

Warning: rsync 3.2.3 already installed
$ rsync --version
rsync version 2.6.9 protocol version 29
Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.
rsync.samba.org/
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
inplace, IPv6, 64-bit system inums, 64-bit internal inums

rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.

Collapse
 
alberto56 profile image
Albert Albala

Just figured this out: if we just close the terminal window and open a new one, it works fine :)

Collapse
 
al5ina5 profile image
Sebastian Alsina

Oh, pardon my delay, but good to hear! :)