Rclone listening folder

is there any way of rclone to listen to any change in a folder (including or modifying objects) and then synchronize it with the cloud?

for that folder,
how many subfolders?
how many files?

lots of subfolders and lot of files.

There was a template when you posted that you erased. We're not sure what OS yoou're on. :slight_smile:

On linux you'd have to use inotify or similar.

sorry, could you give a example?

I using ubuntu 18.04 lts server...

What is the problem you are having with rclone?

What is your rclone version (output from rclone version)

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Which cloud storage system are you using? (eg Google Drive)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here

What is the problem you are having with rclone?

keep a folder synced

What is your rclone version (output from rclone version )

rclone v1.51.0

  • os/arch: linux/amd64
  • go version: go1.13.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

ubuntu 18.04.4 lts server

Which cloud storage system are you using? (eg Google Drive)

google cloud storage (coldline)

The command you were trying to run (eg rclone copy /tmp remote:tmp )

would like to now the better

The rclone config contents with secrets removed.

[gcloud]
type = google cloud storage
service_account_file = XXXXXXXXXXX
location = us-east1
storage_class = COLDLINE

A log from the command with the -vv flag

no command yet

inotify is beyond the help provided here. It is a linux utility that you could potentially use to trigger based on changes. try to google it.

1 Like

Limitations imposed by inotify include the following:

  • Inotify does not support recursively watching directories, meaning that a separate inotify watch must be created for every subdirectory.[5]

thats a problem because we need do watch folders ans subfolders created

As far as I know, inotify is the only kernel FAM implementation available on Linux.
It means that if rclone would watch for files and directories, it would simply use the inotify kernel module under the hood.

If efficiency is very important to you, you can try any BSD type OS instead (FreeBSD is a good one) and use kqueue

There is an issue about this

Which I think our very own @darthShadow was experimenting with.

I haven't gotten around to trying it out....

Anyway, I think this is a better issue matching what the user is asking for:

Yes you are right. We'll need the inotify working for both. Maybe the "listen filesystems events and sync" could be based of rclone changenotifies then it would work for cloud to local as well as local to cloud...

That would be ideal :+1:

Does seafile have a way of telling what changes have happened?

Yes there's a history. I haven't checked how to access it from the API but there's definitely a history available in the interface (it's based on git internally)

1 Like

I think I might be able to fulfil the ChangeNotifier interface actually. The API has been made available 2 months ago :+1:

Are we off-topic BTW? :stuck_out_tongue:

do not. That's really good. I'm following.
if rclone achieves this synchronization by event it would be excellent. :grin:

Nice one :slight_smile:

:man_shrugging: