Rclone - An Rsync Alternative To Sync File With Online Cloud Storage

Backup and Sync are have become essential today and this brings tools like rsync. Rsync is an amazing tool to sync files between 2 computers. But wouldn’t it be cooler if we could sync files from a computer to cloud storage.

This is where rclone – a mod of rsync comes in. Rclone can sync files from your computer to cloud-based storage services including google drive, one drive, drop-box, amazon drive and many more.

Installation

The installation is pretty simple just head over to rclone.org and you can get the binaries or install scripts for various platforms.

If you plan on using the windows binaries, you might want to add them to the path variable. The commands are pretty similar for all systems so it doesn’t matter what machine you are on, you should be able to understand this article.

Configuration

As I already said, the commands are the same for any machine, so let us configure rclone. Firstly type in rclone configand you will be given some choices.

We will create a new remote so type in n and hit enter. It will ask for a name for this configuration, i am naming it after me as of now. You will then be prompted to choose the type of cloud storage that you want to use for syncing.

I am going to choose google drive so I will type in 11 then after that it will ask for 2 more fields that are the client Id and the client secret you can just leave them blank.

​Rclone then asks for the type of permissions you wish to grant it. I would be going with permission no 2 as it allows access to files created by rclone only.

You will then be asked the id of the root folder, to get the root folder id, create a folder in your drive and copy the id from the URL as shown below –

If you leave it blank, the root of the drive will be considered as the root for rclone You will then be prompted for the SA credentials that can also be ignored for the time being.

​Rclone will then require permission from your cloud service and it will ask you to choose between the auto config and the manual config. Since some of us will be using rclone on servers without a GUI, I suggest you choose the manual mode which is very easy as well.

As you can see clone gives us a URL, just visit that URL and you will be given code from your cloud service, that we need to enter in the prompt above.

You will then be asked if this is a team drive, just say no for the moment and we are done. The config part is over. Now it’s time to sync the files.

Syncing with rclone

This is the easiest part out there. To simply sync a folder to your remote folder just type in the following command,

​rclone sync folder_path Rishabh:This will sync the contents of the desired folder in the remote configuration that you created, you can have multiple remote configurations as well.

Conclusion

Rclone is an amazing small utility based on rsync that allows you to sync files from a system to a cloud storage service. It has many options that you can read in the full documentation on this page. If you have any queries regarding this just let me know in the comment section and I’ll be there for you.