Summary
- Rclone was inspired by rsync. It’s designed to move data to cloud storage platforms.
- Rclone supports over 90 cloud platforms, and is easily configured to synchronize your local drive with your cloud storage.
- Rclone lets you copy and synchronize files and directories, and has a two-way sync in beta.
We’re always advised that we need to make regular backups, to different media, and with one copy offsite. The Linux rclone command is an easy way to create and maintain offsite backups.
What Is rclone?
If you’re familiar with the rsync command, it’ll be immediately apparent that rclone was inspired by rsync. The rsync command is a tool that lets you synchronize the contents of two directories.
As long as you’ve got write access to the target directory, rsync will synchronize the contents of the two directories. It’s just as easy to back up locally to an external drive or a different internal drive, or remotely to a different device like another computer or a network attached storage device (NAS).
The neat thing is, only files that have changed or been newly added are transferred, saving time.
The idea behind rclone was to create a tool similar to rsync that synchronizes a local directory with a directory on cloud storage. Having a copy of your files located offsite makes your backup regime much more robust. With rclone, achieving that remote copy is very simple, as is keeping it up to date.
![The ping command on Ubuntu.](https://static1.howtogeekimages.com/wordpress/wp-content/uploads/2024/01/52848912564_6cae6ce5f4_o-4.jpg)
Related
How to Back Up Your Linux System With rsync
If your data is valuable to you, back it up, right from the Linux command line.
Installing rclone
Use this command to install rclone on Ubuntu.
sudo apt install rclone
To install rclone on Fedora, you need to type:
sudo dnf install rclone
On Manjaro, use this command.
sudo pacman -S rclone
Over 90 Cloud Platforms Supported
One of the most impressive things about rclone is the sheer number of cloud platforms that are supported. At the time of writing, rclone works with well over 90 different cloud storage offerings.
Of course, you’ll need to have an account with the platform you wish to use. You’ll need to let rclone know what your account credentials are, so that it can log in as you when it is synchronizing directories.
Setting up rclone involves creating a connection configuration for the remote storage you wish to use. The connection configurations are called “remotes” in the rclone parlance, and you can create as many different ones as you like.
Once you’ve created a remote, you can use its name in rclone commands to perform synchronization actions to the cloud storage the remote represents.
We’ve produced a step-by-step guide for setting up rclone with Google Drive, but won’t worry if you use one of the other supported cloud providers. The rclone website contains example transcripts of rclone config sessions for every single cloud provider rclone supports.
The transcripts show example answers to the questions you’ll be asked during the interactive session that configures your remote.
To start configuring a remote, use the config option.
rclone config
rclone’s Main Features
Like the rsync program, rclone has a multitude of options that can be used to fine-tune its behavior. But, in broad strokes, there are three ways you can use it.
You can send a copy of all the files in a directory to a remote directory. If the same version of a file is already in the remote directory, the file is not sent. Files that are present in the remote directory but not in the source directory are not removed.
You can send a single file if you wish, using the copyto command. You can provide a different name for the transferred file, effectively copying and renaming in one step.
You can synchronize the target directory with the source directory. Again, if the same version of a file already exists in the remote directory, the file is not sent. However, if there are files on the remote that are not in the source directory they are removed, unless you specifically override this action. By default, at the end of a one-way sync, both the target and remote directories contain the same files.
There’s a beta version of a two-sync that results in the source and the target directories containing the same files. This option should be treated with caution until it comes out of beta, and even then only be used if you’re sure you want changes to the remote directory to be mirrored to your local directory.
I Use rclone Every Day
The speed of transfer is dependent on your connection’s upload speed, and whatever rate-throttling your cloud provider may or may not impose on you. Your first run will be the slowest because you have to get all of your data to the cloud.
Subsequent runs will be much faster, because only the changes and additions are transferred, but don’t be surprised if your initial seeding takes all day, like mine did. I knew in advance I was uploading 40GB of data, so it wasn’t a great surprise.
To its credit, rclone tenaciously chewed its way through all of it and copied all of it–directories, subdirectories, and files–perfectly to its new safe haven.
I’ve been using rclone as a part of my backup routine since mid-2020, and it has never given me a moment’s trouble.
![google drive logo on terminal background](https://static1.howtogeekimages.com/wordpress/wp-content/uploads/2019/12/google-drive-logo-on-terminal-background.png)
Related
How to Use rclone to Back Up to Google Drive on Linux
Here’s how to back up files to your Google Drive cloud storage directly from the Linux command line.
An offsite backup gives you a significant, extra level of safety and protection for your precious data. To be able to gain that protection with such ease is truly fantastic.