Question about Fs Watcher Delay

I need to delay Syncthing so it’s not trying to sync to my backup server while I’m in the middle of uploading new data to my primary server, which slows down the upload tremendously. Am I correct in my understanding that if I want to delay syncing so it’s not happening while I’m uploading, I should increase the Fs Watcher Delay seconds?

The Filesystem Watcher Delay may not work the way you’re looking for: It delays Syncthing’s scan of a file that the filesystem watcher has reported as changed, allowing changes to accumulate first.

What I think you will want to do is pause syncing either a Folder or a remote Device. You could do this on a schedule using the Syncthing API, by making changes to the configuration options via the CLI (Syncthing — Syncthing documentation), or manually.

Forgive me. I’m still a noob at this. But what you describe fs watcher as doing sounds exactly like what I need…maybe? I begin an upload, watcher identifies a change, but will delay scanning that change and therefore delay syncing until after the designated number of seconds? Is that right?

1 Like

It should work, you also need to set fs watcher timeout to a high value. Essentially, a scan is delayed by fs watcher delay seconds every time a write is detected, up to a maximum total of fs watcher timeout, which defaults to some multiple of the delay. So you may want to set the delay to 60s and the timeout to 3600s for example, to keep delaying scan a minute at a time up to a total of an hour. (And then it’ll scan it regardless of whether it’s still ongoing.)

1 Like

Ok. I’ll try that. Thanks!

1 Like

Nothing to forgive — your use case was not 100% clear to me and I had thought that a pause might be a better fit. I’m glad this does what you need.

You could even try disabling the watcher altogether and rely on purely timed scans. If there is any kind of regular pattern in the times when your data uploads are done, you could find an interval that avoids conflicts.

1 Like

So, if I disabled the watcher and set the folder scan intervals to 86,400 seconds,or 1 day, it will only try to sync once per day? The question is what time of day.

It will still scan when you start Syncthing, and then count 86,400 seconds from that scan. You cannot specify the exact scan time yourself this way.

Got it. Thanks