In this project, we'll be installing The Rclone program on your Raspberry Pi.

Rclone Installation on the Raspberry Pi

Rclone is an open-source programme that allows you to manage files on cloud storage systems like Google Drive and Amazon S3.

You may use this programme to do a variety of activities, including file synchronisation between your Raspberry Pi and your cloud provider. It's even feasible to mount cloud services on your Raspberry Pi as if they were physical drives.

Rclone is a great way to connect to your cloud storage provider because it supports over 50 different backends. Amazon Web Services, Microsoft OneDrive, and Google Drive are among the most popular cloud storage options.

Rclone can also communicate with self-hosted cloud services such as OwnCloud and Nextcloud.

Most importantly, the programme is quite simple to operate. Rclone leads you through the process of connecting to each of its backends.

Rclone may be installed on your Raspberry Pi with just a few simple hardware that you probably already have on hand.

Recommended

Optional

This guide was tested on a Raspberry Pi 400 running the most recent version of Raspberry Pi OS Buster.

Rclone setup on your Raspberry Pi

We must first prepare our Raspberry Pi so that we can easily set up and install Rclone.

This entails upgrading our operating system as well as installing certain essential software.

1. Let's start by making sure we're working with the most recent operating system.

The following two commands can be used to upgrade Debian-based operating systems like Raspberry Pi OS.

sudo apt update
sudo apt full-upgrade

2. Next, we must make certain that the unzip package is installed.

We won't be able to install the latest version of Rclone on our Raspberry Pi without this.

sudo apt install unzip

Rclone installation on the Raspberry Pi

While we may install Rclone from the package repository, we will be using an old version.

The disadvantage of utilising an outdated version is that cloud services frequently change, which means that what used to function may no longer work.

To get around this, we can get the most recent builds straight from the Rclone project.

1. The latest stable edition of Rclone is now ready to be downloaded to our Raspberry Pi.

To get the newest ARM version, use the wget command on your device.

wget https://downloads.rclone.org/rclone-current-linux-arm.zip

2. We can extract the archive after Rclone has done downloading to your Raspberry Pi.

To extract Rclone, run the following command using the unzip package we installed.

unzip -j -d rclone-temp rclone-current-linux-arm.zip

With this command, we utilise two parameters. The first parameter (-j) instructs unzip to extract everything to the top level only, without creating any folders.

The second parameter (-d DIRECTORY>) instructs unzip to extract all of the files into the given directory.

This directory will be called "rclone-temp" in our case.

3. Now that the files have been extracted, we must relocate them to locations where the operating system can find them.

The Rclone binary is the first file we need to relocate. We'll put this programme in the "/usr/bin" directory because the command line looks for packages there automatically.

To relocate the binary to the right place, use the following command.

sudo mv ~/rclone-temp/rclone /usr/bin/rclone

4. Now we'll build up the Rclone documentation pages.

We do this so that when you enter "man rclone," you will obtain the program's manual.

Let's copy this folder from the extracted folder to the "/usr/share/man/man1" folder.

5. We need to clear up some of our file permissions so that the root user, not our pi user, controls the file.

We'll use chown to grant the root user ownership of the file we just relocated with the following command.

sudo chown root: /usr/bin/rclone

By changing the permissions, anyone with access to the pi user will be unable to switch out the rclone binary.

6. Finally, delete our temporary directory and the zip file we downloaded to complete our installation.

rm ~/rclone-current-linux-arm.zip
rm -r -f ~/rclone-temp

Using Rclone to connect to a remote

We can now start using Rclone now that we've installed it on our Raspberry Pi.

For this example, we'll show you the initial few steps to get you started with the programme.

1. You must first establish a fresh configuration before connecting to your remote.

Use the following command to start the Rclone configuration procedure.

rclone config

2. The first message will inquire as to your intentions.

A warning about the config file not being found may appear. This isn't an issue because we haven't yet created any remotes.

Type n and then press ENTER to start a new remote connection.

2021/01/19 02:15:20 NOTICE: Config file "/home/pi/.config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q>

3. Finally, you must give your new remote connection a name.

We'll call our connection "pimylifeup Rclone" in our example, but you may call it whatever you like.

name>

4. You should now see a list of backends that Rclone can connect to without any problems.

Please keep in mind that by the time you complete this course, this list may have changed.

For instance, if we wanted to utilise Google Drive, we would need to enter in 13.

Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value 1 / 1Fichier   \ "fichier" 2 / Alias for an existing remote   \ "alias" 3 / Amazon Drive   \ "amazon cloud drive" 4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, Tencent COS, etc)   \ "s3" 5 / Backblaze B2   \ "b2" 6 / Box   \ "box" 7 / Cache a remote   \ "cache" 8 / Citrix Sharefile   \ "sharefile" 9 / Dropbox   \ "dropbox"
10 / Encrypt/Decrypt a remote   \ "crypt"
11 / FTP Connection   \ "ftp"
12 / Google Cloud Storage (this is not Google Drive)   \ "google cloud storage"
13 / Google Drive   \ "drive"
14 / Google Photos   \ "google photos"
15 / Hubic   \ "hubic"
16 / In memory object storage system.   \ "memory"
17 / Jottacloud   \ "jottacloud"
18 / Koofr   \ "koofr"
19 / Local Disk   \ "local"
20 / Mail.ru Cloud   \ "mailru"
21 / Mega   \ "mega"
22 / Microsoft Azure Blob Storage   \ "azureblob"
23 / Microsoft OneDrive   \ "onedrive"
24 / OpenDrive   \ "opendrive"
25 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)   \ "swift"
26 / Pcloud   \ "pcloud"
27 / Put.io   \ "putio"
28 / QingCloud Object Storage   \ "qingstor"
29 / SSH/SFTP Connection   \ "sftp"
30 / Sugarsync   \ "sugarsync"
31 / Tardigrade Decentralized Cloud Storage   \ "tardigrade"
32 / Transparently chunk/split large files   \ "chunker"
33 / Union merges the contents of several upstream fs   \ "union"
34 / Webdav   \ "webdav"
35 / Yandex Disk   \ "yandex"
36 / http Connection   \ "http"
37 / premiumize.me   \ "premiumizeme"
38 / seafile   \ "seafile"
Storage>

5. Depending on whatever backend you wish to connect to, the instructions will alter substantially at this point.

When connecting to OneDrive from your Raspberry Pi, for example, the processes are different than when connecting to Google.

To connect your Raspberry Pi to your chosen remote, follow the instructions given.

Rclone Software Updating

If you've been using Rclone for a long, you should upgrade to the most recent version.

We won't go through these stages in detail because they are fairly similar to the installation processes.

1. First, get the most recent version of the Rclone programme.

wget https://downloads.rclone.org/rclone-current-linux-arm.zip

2. Extract the archive to your current working directory.

unzip -j -d rclone-temp rclone-current-linux-arm.zip

3. Replace the old Rclone binary with the new one.

sudo mv ~/rclone-temp/rclone /usr/bin/rclone

4. Now we simply need to fix the permissions on our Rclone binary that has been changed.

sudo chown root: /usr/bin/rclone

5. You should now be able to utilise your Rclone installation that has been updated.

rm ~/rclone-current-linux-arm.zip
rm -r -f ~/rclone-temp

Before continue, we need use the two instructions below to clear up the files we just downloaded.

Conclusion

Hopefully, Rclone is now installed on your Raspberry Pi at this time.

Rclone is a sophisticated piece of software for cloning data from a variety of cloud services.

It's a dependable alternative to installing client-specific software for Dropbox and gDrive.

If you have any problems getting Rclone to work on your Pi, please leave a comment below.

Original post : https://shopmakergenix.blogspot.com/2022/05/rclone-installation-on-raspberry-pi.html