Save files on local storage from rclone (OneDrive)

I have set up rclone for OneDrive. However, I can only access it online. Since I have to work offline quite a bit, I need to access the files offline. In Windows, I can just select that I want to save the files locally. (Meaning they end up in %userprofile%\Onedrive) It will then automatically sync changes from and to the cloud when I'm online.

How do I do this with rclone?


Solution 1:

There are only 5 reliable ways to access OneDrive on Linux:

  • Via the OneDrive for Linux client - https://github.com/abraunegg/onedrive - this 'syncs' your data, bi-directional operation, open source and free, data available offline
  • Via the 'onedriver' client - https://github.com/jstaf/onedriver - Native file system that only provides 'on-demand' functionality, open source and free, data is not available offline
  • Via 'rclone' - https://rclone.org/ - one way sync client, open source and free, data available offline if you configure it that way
  • Via 'insync', 'ExpanDrive' - non-free client
  • Via the web browser of your choice

Solution 2:

Rclone allows mounting a remote drive so it appears in the file system as local storage. However, it allows to copy files between the local storage and the cloud (which is actually its prime purpose)

For offline work, you need to copy, i.e. create a local repository of the files you need to work with off line. You can then later update the files on the cloud using rclone.

This can be easily facilitated by placing the needed rclone command in a script, or even an alias.