Rclone is an open source command line tool which helps to manage files on Google Cloud Storage, Google Drive, Amazon Drive, Dropbox, Amazon s3 and other cloud storage.
Rclone command is very important in the syncing, transferring, Caching of files for servers.
Here at Ibmi Media as part of our Server Support Services, we regularly help our customers to do Server and Website Migration Services.
In this context, we shall look into the steps taken to install and setup rclone on different operating systems such as Windows, Linux and MacOS.
To install rclone, you have to download its binary file from Rclone official website . We are going to describe briefly the steps to do rclone installation on Linux, MacOS as well as on Windows.
To begin, you have to get the binary file as stated above and for Debian or Ubuntu Linux distribution, use the command below to update the system packages and get unzip tool installed;
sudo apt-get update
sudo apt-get install unzip
To install unzip on CentOS or Fedora, use the command below;
sudo yum install unzip
With the unzip package, navigate to the directory location where rclone zip file you downloaded is and then unzip the zip archive and change directory with the cd command. Use the command below;
unzip rclone*
cd rclone-v*
Now make the binary available to the server environment by copying the file to the directory, /usr/local/bin. Use the command below;
sudo cp rclone /usr/local/bin
Finally, we can create the configuration directory and define the attributes of the files we are trying to sync in the configuration file as shown below;
mkdir -p ~/.config/rclone
nano ~/.config/rclone/rclone.conf
In MacOS, navigate to the directory where the downloaded rclone zip file is with the cd change directory command and unzip the file followed by moving it into a new directory. Use the command below;
unzip -a rclone*
cd rclone-v*
Next, ensure that the /usr/local/bin directory exists and if not create a directory and move the rclone binary into it with the command below;
sudo mkdir -p /usr/local/bin
sudo cp rclone /usr/local/bin
Finally, create the configuration directory and edit the configuration file defining the file attributes as shown below;
mkdir -p ~/.config/rclone
nano ~/.config/rclone/rclone.conf
To begin, In Windows, go to the directory where the downloaded Rclone binary file is in Windows file Explorer.
As soon as you see the file, select it by doing a right click on it and Extract the file. This will extract the file from the zip archive.
After extraction, Locate the rclone.exe executable file. Then with a command line tool (cmd.exe) in Windows, navigate to the path where the rclone executable file is located which will look like this;
cd C:\> cd "%HOMEPATH%\Downloads\rclone*\rclone*"
Any time you need to use the rclone.exe command, you have to be in this directory.
From here, create the configuration directory and open the configuration file where you will define the Spaces attributes just as shown below;
C:\> mkdir "%HOMEPATH%\.config\rclone"
C:\> notepad "%HOMEPATH%\.config\rclone\rclone.conf"
Rclone is an open-source command line tool which helps to sync files to cloud storage which is makes data migration between storage spaces easy.