Raspberry Pi

How to Update Rsync on Raspberry Pi

Remote Synchronization, commonly referred to as Rsync, is an open-source command-line utility used for efficiently transferring and synchronizing files and directories between two systems across the network. It uses an algorithm that enables users only to send or sync the changed portion of files because it compares the modification time and file sizes before performing the syncing or transferring operation.

RSync is already installed in most Linux distributions; the same applies to the Raspberry Pi system. However, it’s an outdated version, less effective than the latest one regarding bug fixes and enhanced features.

This article is a detailed guideline for updating Rsync on your Raspberry Pi system.

How to Update Rsync on Raspberry Pi

Before moving towards the Rsync installation, ensure that your Raspberry Pi system must have Rsync installed and you can confirm using the following command:

$ rsync --version

The Rsync version “3.2.3” is an outdated one and the latest version right now is “3.2.7”, which you can install using the following steps:

Step 1: Install Dependencies

First, you must install a few dependencies required for Rsync installation and you can execute the following command to install those dependencies on Raspberry Pi.

$ sudo apt install gcc g++ gawk autoconf automake python3-cmarkgfm libssl-dev attr libxxhash-dev libattr1-dev liblz4-dev libzstd-dev acl libacl1-dev -y

Step 2: Download the Latest Version Rsync File

Go to the website and grab Rsync latest version file for the Raspberry Pi system. In my case, the latest one is “3.2.7”, which can be downloaded through the following command:

$ wget https://download.samba.org/pub/rsync/src/rsync-3.2.7.tar.gz

In case the server fails to respond through the “wget” command, you can use the direct link on your chromium-browser to download the Rsync source file.

Step 3: Extract Rsync Source File Contents

First, make sure where the source file is generated because if you follow the direct link method, it may go into the “Downloads” directory and you have to navigate the directory first through the “cd” command.

In my case, it’s in the home directory and the command to extract Rsync source file contents is given below:

$ tar -xf rsync-3.2.7.tar.gz

Step 4: Configure Rsync

To start configuring the Rsync setup files, first navigate to Rsync directory through the following command:

$ cd rsync-3.2.7

Then use the following command to start Rsync configuration.

$ ./configure

Wait until you receive the terminal’s Rsync successful configuration message.

Step 5: Prepare Rsync Installation Files

To prepare Rsync installation files, run the following command:

$ make

Step 7: Install Rsync on Raspberry Pi

After the files are prepared and compiled successfully, it’s now time to begin the Rsync installation using the following command:

$ sudo make install

Reboot the device for the changes to take place.

Step 9: Confirm the Rsync Installation

After the changes, you can confirm the installation of Rsync’s latest version on Raspberry Pi through the following command:

$ rsync --version

The above command ensures that we have successfully updated Rsync on the Raspberry Pi system. For guidance on how to use Rsync, you can follow this article or here.

Conclusion

Rsync is a tool for synchronizing and transferring files between two systems across a network. Though this tool is already installed on the Raspberry Pi system, you can update it to the latest version by following the above-mentioned guidelines. These guidelines require downloading the Rsync latest version source file and extracting it into the home directory. After configuration and file installation through the “make” command, you can install and update the Rsync version on your Raspberry Pi system. However, you must reboot the device to update the changes.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.