How to Set up Rclone in Ubuntu?

Reading Time: 3 minutes

In this Article we will be looking at Rclone (“rsync for cloud storage”) which is a command-line program to sync files and directories to and from different cloud storage providers.

Written in Go language, It Supports different cloud storage providers such as: Amazon Drive, Amazon S3, Backblaze B2, Box, Ceph, DigitalOcean Spaces, Dropbox, FTP, Google Cloud Storage, Google Drive, etc.

Rclone mounts any local, cloud or virtual filesystem as a disk on Windows, macOS, linux and FreeBSD, and also serves these over SFTP, HTTP, WebDAV, FTP and DLNA.

Features of Rclone

It helps to Backup (and encrypt) files to cloud storage

This can Restores (and decrypt) files from cloud storage

It can Mirror cloud data to other cloud services or locally

To Migrate data to cloud, or between cloud storage vendors

Mount multiple, encrypted, cached or diverse cloud storage as a disk

Here MD5, SHA1 hashes are checked at all times for file integrity and Timestamps are preserved on files

It can sync to and from network, eg two different cloud accounts.

It has Copy mode for new or changed files.

Now let’s Setup this Rclone on our Ubuntu Machine

There are multiple ways of Installing Rclone on our systems. First is through their Installation Script.

curl https://rclone.org/install.sh | sudo bash

Note that this script checks the version of rclone installed first and won’t re-download if not needed.

The second way to install rclone is by issuing the following commands.

Linux installation from precompiled binary

Fetch and unpack

curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64

Copy binary file

sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone

Installing manpage

sudo mkdir -p /usr/local/share/man/man1
sudo cp rclone.1 /usr/local/share/man/man1/
sudo mandb 

Next what you will need to do is run the rclone config to create your config file. It will be used for authentication for future usage of rclone. To run the configuration setup run the following command.

rclone config

After running this Command, You will see this prompt.

Here as you can see, n is for setting new remote and s is for setting configuration password and q is for Quit config.

Pressing n , created a new remote connection and give it a name first then it will ask to to select the type of storage to be configured.

It has long list of 45 storage (at the time of blog writing) to choose from, We chose google drive just for a demo. we choose default for the rest options and finally in the end you will be asked to autoconfig. this  which will generate all the required info to connect to your Google Drive and after that it will ask you to authenticate rclone give permissions to use data from Google Drive.

This is Just for a demo purpose, you can choose any other storage if you wish and setup Rclone accordingly.

Conclusion:

This blog was about Rclone, which is powerful command line utility. In this blog I gave an idea on how to install rclone on your ubuntu systems. If you want to know more about rclone and its other features, you can visit official documentation. If you liked my Blog please do comment and share.

References:

Ref1 Ref2

Written by 

Passionate about Technology and always Interested to Upskill myself in new technology, Working in the field of DevOps