Is rclone able to sync between multiple computers and a cloud service?

Hello! I have two computers (desktop and laptop) and I use OneDrive to back up my files. I'd like to be able to, say, alter a file on my desktop and have these changes updated to my laptop via OneDrive.

I've been trying to do this using a cronjob on each computer (I've tried every minute for each, or every even minute on the laptop and odd minute on desktop, etc), but I have faced difficulties with either one computer maintaining it's version of a file preferentially over the others, or overwriting its own more recent version with an older version from the others.

An example of a command (via crontab -e on both computers) I've tried is:

# COPY TO ONEDRIVE
*/1 * * * * rclone copy ~/Documents onedrive:/Documents/ 
*/1 * * * * rclone copy ~/Pictures onedrive:/Pictures

# COPY FROM ONEDRIVE
*/1 * * * * rclone copy onedrive:/Documents ~/Documents 
*/1 * * * * rclone copy onedrive:/Pictures ~/Pictures

I've also tried the following script, which was also performed as a cronjob on each computer:

rclone copy ~/Documents onedrive:/Documents && rclone copy onedrive:/Documents ~/Documents
rclone copy ~/Pictures onedrive:/Pictures && rclone copy onedrive:/Pictures ~/Pictures

I've tried many variations of these, altering when one copies to OneDrive and vice versa, each with their issues. I've also tried using the sync command, but was concerned about data loss.

My question is: is it possible to do what I want using rclone? Is there a more intelligent way to go about this?

Thank you very much

I have forund the program Syncthing, which seems more intentionally designed for my usecase. I think I will use rclone only for backing up my data a couple times a day, vice to continuously sync, which seems more like what it was designed for.

I would still like to know if my above question is possible, though!

Not really as rclone isn't a real time sync tool.

If you use a mount you still get some delays in updating from one to another.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.