How to Sync File and Directories to Cloud Storage in Linux Using Rclone Tool?
Last Updated :
20 Apr, 2021
Rclone is a command-line tool for synchronizing files and directories between Google Drive, Amazon S3, Openstack Swift / Rackspace cloud files / Memset Memstore, Dropbox, Google Cloud Storage, and the local filesystem. It is a single binary file that contains a Go program. Rclone is an MIT-licensed Free and Open Source Software that can be found in its Github repository.
Installation
First, you need to install curl using the below command, if you already have, you can skip this step:
$ sudo apt-get install curl
Installing curl
By running the following command, you can install Rclone using the installation script:
$ curl https://rclone.org/install.sh | sudo bash
Installing Rclone using the script
Rclone now should be installed in your system.
Configuring
The next step is to run the rclone config command to generate your config file. It will be used for rclone authentication in the future. Run the following command to start the configuration setup.
$ rclone config
Run rclone config
We now have the option of creating a new remote. We'll definitely want to add a remote because we don't have one right now.
Select "n" for remote
Give it a name; we've given it the name gdrive :
Following that, we'll be given a list of sources to use with our new remote. Since we're going to try Google Drive, we'll pick 15
We are selecting 15 which is Google Drive.
We are selecting 15 which is Google Drive
Just press enter to leave default:
Just press enter to leave the default
You may simply leave the default answer, which is an empty " ", for the remaining questions.
When prompted, select "autoconfig," which will generate all the necessary information to link to your Google Drive and grant rclone permission to use Google Drive data.
Select y
Now you need login into your Google account and give permission to allow it.
Give permission to rclone
Now select yes:
Select yUsing Rclone
Now we'll learn how to transfer/sync files and directories with Google Drive using Rclone. Here are some examples of what we can do with the Rclone function.
Copy Data with rclone
We may use rclone copy source: to copy a file or folder rclone copy source: path dest: path order
rclone copy /home/ubuntu/Documents gdrive:test
Copy fileList Remote Directory
rclone ls des:path
List filesSync data with rclone
Using the command we can easily synchronize the source with the destination. as rclone sync source: path dest: path
Sync data
We've built Rclone and learned how to use it, which is great. As far as we know, this article explains what Rclone is, its functionality, and how to install and use it. Rclone is a command-line tool for synchronizing files and directories between Google Drive, Amazon S3, Openstack Swift / Rackspace cloud files / Memset Memstore, Dropbox, Google Cloud Storage, and the local filesystem.
Similar Reads
How to Share Files Between Linux Computers Using NFS The Network File System, or NFS protocol, is widely used in Linux for sharing files and directories between Linux systems on the same network. Here, the shared directories are created on a file server running the NFS server component. The files are added to these folders and then shared with other L
5 min read
How to Use Cloud Storage For Firebase For Mobile and Web Apps? Cloud Storage as the name suggests is one of the most important storage tools offered by Firebase which is available for both mobile and web app development and is powered by Google. It provides various facilities to users like storing, retrieving, and managing data such as documents, images, videos
9 min read
Introduction and Setup of Cloud Firestore in Your Project Cloud Firestore is a versatile and scalable database for developing mobile, web and server applications, provided by Firebase and Google Cloud Platform. It offers easy integration with other Firebase and Google Cloud products and features like real-time updates, offline support and efficient queries
5 min read
How to Upload Single/Multiple Image to Cloudinary using Node.js ? Uploading images to Cloudinary from a Node.js application is a common task when you need to manage and store images in the cloud. Cloudinary is a cloud-based service that provides comprehensive solutions for image and video management, including upload, storage, manipulation, and delivery.Approachto
4 min read
How to Use Cloud Storage to Store Your Data? In today's fast-evolving world where data is the new currency, it is important to manage and store data appropriately, whether you are a business professional, a student, or simply someone who values your data and privacy. Cloud storage is one solution to it and is more effective than the traditiona
10 min read