Rclone mount vs Sync

I've been searching the forum and reading up on the cache function within rclone but I need advice to see which way I should go.

Rclone version:

v1.53.3

os/arch:

unRAID (Linux/amd64)

Cloud Storage:

Onedrive

Current command in use

rclone mount --vfs-cache-mode writes --max-read-ahead 1024k --allow-other OneDrive: /mnt/user/NAS/OneDrive

What I want to Achieve

I have a separate 800GB SSD that I would like to sync with OneDrive, with sync I mean that I want it to be in continous sync so that the SSD on my unRAID system has the exact same content as my OneDrive at "any" given moment (30-60seconds delays are of course OK!)

So if I upload a picture from my phone to OneDrive, it will be synced to my unRAID server asap.
And when i dump my nightly backups in unRAID to my SSD, I want them to be uploaded to my OneDrive.

Reason? I've been running the rclone mount command for a while and the slowness of browsing huge photo albums (not only looking at a folder and thumbnails, but opening and scrolling through pictures in high speed. As well as unzipping files and other tasks where a "local" file is quicker, the slow speed is killing me!
I'd love to have the speed of an SSD, but the safety of knowing that my files are synced to OneDrive.

Is it as easy as switching out my "rclone mount ...." command to:

rclone sync OneDrive: /mnt/disks/OneDrive

reading the rclone wiki it says this about syncing, which I dont really understand since english isn't my main language

Sync the source to the destination, changing the destination only. Doesn't transfer unchanged files, testing by size and modification time or MD5SUM. Destination is updated to match source, including deleting files if necessary.

I'm reading that as it's not a 100% sync, it will only upload files to my onedrive, but not download files, or the other way around depending on what i set as source/dest

hello and welcome to the forum,

rclone syncs in one direction only, from source to dest.
you can choose the source and dest.

All right, so i guessed correctly about the sync command, are there any functions in rclone that would let me do a real "sync" between source and destination so that they always have the same content?

aaah that makes sense :smiley: Thanks, I'll try!

You could use the vfs cache --vfs-cache-mode full. If you set a high value for --vfs-cache-max-age then the files will stay on your disk for ages. So the first time you open them they will be slow, but the second they will be fast.

I don't recommend doing this.... If you want to try then you want rclone copy not rclone sync to avoid data loss. This will work, but if you want to delete something you'll have to delete it in both places.

One day rclone will have bi-directional sync!

1 Like

Thanks for the reply Nick! I'll go with your suggestion =)

hi,

that advice i gave you, that was a mistake.
@ncw was correct, using copy not sync

in any case, always test first using
https://rclone.org/docs/#n-dry-run

and perhaps these
https://rclone.org/docs/#log-file-file
https://rclone.org/docs/#log-level-level

No worries on the test part, I got more backups of the content, and file history/recycle bin enabled on OneDrive :slight_smile: So it wouldn't be the world if something got deleted

1 Like

There are a few wrappers around rclone that provide true two way sync. I actually wrote two of them (though I only suggest one: syncrclone). But there others also worth considering. Two way sync is an opinionated process and there are pros and cons to how I did it vs the others. I obviously like mine but doesn't mean you will.

Anyway, it is not automatic like, say, Dropbox or OneDrive's first-party app. You could run it on cron but that is still not automatic. For me, I call a sync, do what I want, and call sync again when I am done to "save" it.

I use it on macOS and Linux. I suspect it could support Windows with some tweaks but I don't have the need.

another option is to use the rclone mount.
then use a local tool for syncing tool like
https://syncthing.net/

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