In this Rclone introduction tutorial, we will learn what is Rclone and its important features, how to install Rclone in various Linux operating systems, and finally how to access Rclone Web interface from a web browser.
Table of Contents
What is Rclone?
Rclone ("rsync for cloud storage") is a commandline, feature rich cloud sync application to backup and restore files to and from local and cloud storage. Rclone is an opensource program inspired by Rsync and it is written in Go programming language.
Let us see a brief description of some notable features of Rclone.
Rclone features
1. Mount filesystems as a disk
Using Rclone, we can mount a local or cloud or virtual filesystems as a disk in Linux, macOS, and Windows operating systems, and serve the local or remote files over SFTP, HTTP, WebDAV, FTP and DLNA.
2. Rclone is secure and safe
Rclone is very secure by design! It encrypts the files before transferring them to a cloud storage and decrypts the files when restoring them from the cloud storage to our local disk.
3. Sync files between different cloud providers
It not only synchronizes files from local to remote cloud storage, but also can sync files between two different cloud services as well. For instance, it is possible to sync files between Google drive and Dropbox using Rclone.
4. Avoid duplicate files
Rclone will not copy the identical files. When using the 'copy
' command, it checks the size and modification date or MD5SUM of the files.
If it finds the files are identical on both source and destination, it will simply skip them and copy only the new or changed files instead.
5. Reduce bandwidth and time
Another notable feature is Rclone doesn't use local disk when transferring files from one cloud provider to another. This will significantly reduce the local bandwidth usage as well as the transfer time.
6. Delete local files after moving them
Rclone has an option to move files to cloud storage and delete the local files after verification. This is useful when you don't want to keep same files in multiple locations.
7. Compress and split files
Some cloud providers imposes size limits. So you may not able to upload large files. In such cases, you can either compress them or split the large files into smaller pieces during upload.
The file chunks will be assembled back when the file is downloaded.
8. Verify data integrity
Rclone's work isn't over after uploading the files to the cloud. It also looks after your data.
Rclone will preserve timestamps and verify checksums of the uploaded files all the time for file integrity.It checks data on both source and destination by comparing file sizes and hashes.
It also has options to compare only the size or the hash value. Please note that Rclone neither alters the source nor the destination.
9. Rclone commands are same as normal Linux/Unix commands
Rclone includes cloud equivalents to many traditional Linux and Unix commands such as rsync
, cp
, mv
, mount
, ls
, ncdu
, tree
, rm
, and cat
. If you're already familiar with these commands, Rclone CLI usage would be much easier!
If you're not sure about what will be the actual outcome of a command, you can use the --dry-run
option to simulate the commands even before running them. You can read more about simulating commands in this article.
10. Rclone has a WebUI
Rclone was purely a command line program in the earlier days. Fortunately, it does have an experimental Web based GUI now. So if you're not comfortable with CLI, you can perform many Rclone operations graphically via a Web browser.
11. Supports many cloud providers
As of writing this, Rclone can efficiently manage files on 40+ cloud storage providers, such as AWS, Backblaze, Google drive, Dropbox, Mega, NextCloud, ownCloud, Rackspace and many. The complete list of supported providers is given here.
12. Rclone is free, multi-platform and open source!
As stated already, Rclone is a cross-platform application, works well under Linux, Unix, macOS and Windows operating systems.
The source code is freely available in GitHub. You can inspect its code, improve the code, add features, report bugs, port it to other platforms, and contribute in any way possible.
Install Rclone in Linux and Unix
Rclone can be installed in a few ways. You can install Rclone from the official installer script, using the package manager and from the source.
1. Install Rclone using the installer script
Rclone developers have a made an installer script to install both stable rclone or beta version.
To install Rclone on Linux, BSD and macOS systems, run the following command from your Terminal:
$ curl https://rclone.org/install.sh | sudo bash
This script will first check if Rclone is already installed on your system. If it is already installed, it will simply terminate without reinstalling Rclone.
If you want to try the latest beta version, run this command instead:
$ curl https://rclone.org/install.sh | sudo bash -s beta
Some of you won't prefer directly running the script. If you're one of them, you can try installing Rclone using any one of the methods given below.
2. Install Rclone using package manager
Rclone is packaged for many Linux and Unix-like operating systems. Rclone is available in the default repositories of most Linux distributions, so we can install it using the default package manager as shown below.
To install Rclone in Arch Linux, EndeavourOS and Manjaro Linux, run:
$ sudo pacman -S rclone
Install Rclone in Alpine Linux:
$ sudo apk add rclone
Debian, Ubuntu, Linux Mint, Pop OS:
$ sudo apt install rclone
Fedora, RHEL, CentOS, AlmaLinux, Rocky Linux:
$ sudo dnf install rclone
In RHEL and its clones, you should enable [EPEL
] repository before installing Rclone.
$ sudo dnf install epel-release
OpenSUSE:
$ sudo zypper install rclone
3. Install Rclone from source
Make sure you have installed at least Go 1.4 or higher version. follow any one guides to install Go in Linux.
After installing Go, run the following command to install Rclone from source:
$ go get github.com/rclone/rclone
If you want the latest beta version, run:
$ go get github.com/rclone/rclone@master
4. Install Rclone from pre-compiled binaries
Rclone is also available as precompiled binaries.
Download the latest Rclone binary:
$ curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
This will download the Rclone zip file in the current directory. Extract the Zip file using command:
$ unzip rclone-current-linux-amd64.zip
This will extract the contents in a directory. Cd into it:
$ cd rclone-*-linux-amd64
Copy Rclone binary file to your $PATH:
$ sudo cp rclone /usr/bin/
Set proper ownership and permissions to the Rclone binary:
$ sudo chown root:root /usr/bin/rclone
$ sudo chmod 755 /usr/bin/rclone
Next, install manpage for Rclone by running the following commands one by one.
$ sudo mkdir -p /usr/local/share/man/man1
$ sudo cp rclone.1 /usr/local/share/man/man1/
$ sudo mandb
5. Install Rclone snap
Rclone is also available as Snap.
To install Rclone snap package, run:
$ sudo snap install rclone --classic
Check Rclone version
Once installed, you can verify the installed Rclone version with command:
$ rclone version
Sample output:
rclone v1.57.0 - os/version: arch 21.2.1 (64 bit) - os/kernel: 5.10.89-1-MANJARO (x86_64) - os/type: linux - os/arch: amd64 - go/version: go1.17.5 - go/linking: dynamic - go/tags: none
Display Rclone help
We can view the Rclone help section by running the following command:
$ rclone help
Or,
$ rclone -h
This will list the available Rclone commands along with a small description for each command.
If you want to view the help section of a specific rclone command, run:
rclone [command_name] --help
Example:
$ rclone mount help
This will display the help section of rclone mount
command.
To view available, global flags, run:
$ rclone help flags
View the supported cloud providers:
$ rclone help backends
You can get the information about a particular backend as shown below.
rclone help backend
Example:
$ rclone help backend mega
This will display the help section for using Mega backend.
Access Rclone Web GUI
The recent Rclone version ships with a simple Web based UI for Rclone. You can access Rclone Web GUI by running the following command from the Terminal:
$ rclone rcd --rc-web-gui
It will open the Rclone dashboard at http://localhost:5572/ URL in your default browser.
You will be asked to enter the username and password when you re-login to Web UI in second time. The default username and password for Rclone WEB UI is admin/password.
We will learn more about Rclone GUI in a separate guide soon.
Conclusion
In this guide, we briefly discussed what is Rclone and some of its important features. We also looked at 5 different ways to install Rclone in various Linux operating systems. Finally, we concluded the article with steps to access the Rclone Web based UI.
In our next articles, we will see how to backup files to various cloud providers such as Google drive, Dropbox and OneDrive etc.
- How To Mount Google Drive Locally Using Rclone In Linux
- How To Mount Dropbox Locally Using Rclone In Linux
- How To Transfer Files Between Dropbox And Google Drive With Rclone In Linux
Resource:
Linux backup and synchronization guides:
- Vorta – A Graphical Frontend For BorgBackup
- How To Backup And Restore Files Using BorgBackup In Linux
- How To Backup Your Entire Linux System Using Rsync
- How To Backup Files And Directories Using Rsync In Linux
- How To Backup And Restore Linux System With Timeshift
- How To Backup And Restore Files Using Deja Dup In Linux
- How To Setup Backup Server Using Rsnapshot
- How To Synchronize Files With Unison On Linux
- How To Synchronize Local And Remote Directories In Linux
- How To Synchronize Files And Directories Using Zaloha.sh
- CYA – System Snapshot And Restore Utility For Linux
- Restic – A Fast, Secure And Efficient Backup Application
2 comments
I suggest adding the vfs-cache option, such as
rclone mount mygdrive: ~/gdrive/ –vfs-cache-mode=full
vfs-cache-mode will let rclone mount work with a local cache for both write and read operations. Let’s say that you’re writing a 50MB file. Without write cache, your application will hang until it can write to gdrive directly. Let’s say that you’re listening to an audio file, stop it and want to jump forward… vfs read cache will cache it and let your aplication use the file instantly as long as it is opened.
tl;dr:
–vfs-cache-mode=full makes rclone mount work just like official google drive windows app
Thanks for the tip. I will cover about rclone commands in a separate article and include your tip as well.