Sync monitor using changenotify trigger


It seems rclone supports changenotify to be notified on changes happening on a remote (used when mounting a remote). It would be great if we can include this in rclone sync to continuously monitor supported remotes for changenotify and sync/copy those files.

At the moment this seems to possible with some effort via monitoring stdout from rclone test changenotify, parsing it and executing rclone with files-from. But this requires an additional script to monitor this, while apparently most if not all the cogs exists in rclone and just need to be exposed via an option.

welcome to the forum,

have you checked/posted at rclone github issues?
for example, Feature request: Listen filesystem events and sync #249

Yes, I've checked the github issues and the forums. Most references on changenotify is for implementing some mode of monitoring local filesystem changes which is not what I'm asking for. I'm asking to use the already existing implementation for remotes monitoring used by mount and expand them to be able to use it also in sync.

i believe there is an open topic about that.
For this proposal to be useful we need more backends to support it.

That topic seems to be again on a global level including local filesystems.

Let's look at it this way. This feature currently works when using rclone mount and it's also viewable directly via executing rclone test changenotify, so it's not reinventing the wheel completely, all it needs to do is expand the functionality when syncing from supported remotes .

yes, i understand what you want, would be a nice feature.

i am suggesting that there are open github issues related to your issue.
so you can post at one of those issues or create a new issue.
then post that link here here in the forum.

What's the problem you are trying to solve for?

Most people don't mount a remote and just copy new files as mounts tend to be for using specific things when needed (Not saying you are wrong, but I don't get what problem / use case you are trying to get past).

I'm trying to sync a huge dropbox folder down to local storage. I don't want to run rclone sync every few minutes since rclone sync is a recursive comparison and it will take too long. Instead, I want to have rsync do an initial recursive sync and then stay open monitoring for change notifications received from dropbox and sync those items.

Continues syncing/bisyncing would be very interesting functionality - effectively like syncthing for cloud. The big question is if it is worth of pursuing - very few remotes (3 to be precise) support polling so it would be only working for small % of rclone users.

To make it more universally useful it would also require solving changenotify for local filesystem (very OS specific story). Otherwise it would be extremely niche feature.

For sure if somebody proposes working solution (PR) and commits to ongoing support it can be incorporated.

What's a huge folder? 1000 files? 10,000? 1,000,000?

Closer to 1,000,000 files.