There are many cloud storage services available for Linux, for example Dropbox. But a major problem that all users face is; Microsoft does not provide a desktop client for Linux and does not allow resorting to use a web browser for accessing your files in OneDrive.
Is there any solution for this?
Yes!! Rclone, an open-source command-line tool that synchronizes a local Linux directory with various cloud storage services. You can back up and restore files to and from the cloud storage, create mirror cloud data, use multiple cloud storage as a disk and also migrate data between cloud services.
In this Linux tutorial, we shall see how to use this rclone command on Linux.
Sync Remote Cloud Server on Linux with rclone:
The first thing we need to do is to install Rclone on your Linux system. Type the following command in your Ubuntu terminal, to begin with, the installation process.
sudo apt update && sudo apt install rclone
Step 1: Adding new Remote
After you have installed rclone, all you need to do is to configure rclone. Type the following command in the terminal for the configuration.
rclone config
It displays few options there. If you are using rclone for the first time, you have to select n
to add a new remote.
Now you have to enter the name of the cloud server where you want to perform operations.
Step 3: Select cloud service you want to sync with rclone
After entering the name of the cloud server, you will see a list of cloud services like OpenDrive, Pcloud, Google cloud storage, and others.
Here, you need to enter the number of the service you want to use. Be careful while choosing the servers.
Enter new the values it prompts you for.
As we are not looking for any advanced configuration. Of course, enter N
(No).
Then you will be asked to use auto config, enter Yes (Y
).
Step 4: Log in to your remote server account
You will be redirected to your default browser, where you have to log into your Microsoft account by entering your credentials.
Step 5: Enter your account type
If you are working on the OneDrive, Now it will ask you to select an account type.
There will be different account types provided there as shown in the figure, choose one among them
After that, you will encounter a list of different Drives associated with your account. Select your drive and enter Y
for yes in the next step.
It asks for Conformation Press Y
if you find everything is okay.
Then you will see the same pop-up menu you saw previously. Now you need to enter ‘q
’ to exit the Rclone configuration menu.
Step 5: Mounting in the file manager
Create a folder in your system directory where you will mount your cloud server. To create a new folder, use the command with your directory name and save it in the root directory; we use the /
symbol.
mkdir ~/Studytonight
Now in order to write to the cache, you have to use the following command
rclone --vfs-cache-mode writes mount "one drive": ~/ Studytonight
In the above command Studytonight is the name of the remote, In case, if you have any different names you should use the correct name.
The command mounts one drive in the location given. When you stop the process with, CTRL + c
then it will get unmounted.
Conclusion:
Rclone tool that synchronizes a local Linux directory with various cloud storage services. You can back up and restore files to and from the cloud storage, create mirror cloud data, use multiple cloud storage as a disk and also migrate data between cloud services. The article gives you an idea of how to use the rclone command.