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