Feature request: pausing to also include scanning

Can you tie in the folders pause function to also omit the folders from being scanned completely, not even the background one. Often I have to restart the pc which hosts syncthing and on a restart it will rescan all the folders which can take several days. (I use a USB3 ext hdd - it’s a snatch and go offsite backup so I know my IO is poor)

Another reason is I have >1Tb files (windows backups) and the rescan can take a long time so by purposely omitting unnecessary scans I can focus on prioritizing folders.

I don’t think paused folders are scanned. When you start folders are not paused hence the initial scan, but you can start with the pause command line flag to avoid that.

I think @terry means clicking “pause” should pause scanning. This is a good idea.

@uok Yes!!

Clicking Pause will prevent scanning, but does not kill the current scan process.

You should check, why that file is always scanned, even though it didn’t change. Syncthing only reads/hashes files, which have a different size and mtime sa the one in its DB.

That’s news to me: It will finish hashing the current block, but after that scanning should stop. This only applies once all the motions set in place by clicking “Pause” have finished, i.e. the config has been posted and everyone has been notified of the config change. Under high load, that might take a moment.

Just trying pause on 1.20.0 rc1 and if I pause all the jobs and all jobs show paused then restart or shutdown Syncthing, when I open it all the jobs are not paused and starts scanning again.

I could really do with some hard control over the scanning side.

Presently I have rescans and file watcher disabled on the receive side which helps keep the scanning in check, but after a Syncthing start litterally takes days to complete the startup scan.

Pauses are persisted in the config so should certainly stay paused over a restart. They do so for me in 1.2.0-rc.1. There are some relevant startup flags however:

jb@kvin:~ $ syncthing --help | grep pause
  -paused              Start with all devices and folders paused
  -unpaused            Start with all devices and folders unpaused

Maybe it’s a windows specific thing, but I just paused all the jobs and the config hasn’t updated after shutting down Syncthing. For example…


Do any other config changes persist?


image image

I watched the config datestamp change as I edited the name

Then I’m out of ideas. :confused:

It looks like the pause whether on each folder or as a group only now seems to be ‘per session’. I do have one folder that’s been paused (by me) for around two months and that’s persistent as I can see the flag in the config set as True.

That would have been around 1.13 so it did work in the past (pause / updating the config)

This is interesting. If I add the pause flag and start St, it’s all paused, this is to be expected. However, if I then resume any or all folders, the config is updated. If I then re-pause within St, there’s no config updates again.

Seems to be related to the pause button

This is one of those folders that take ages to scan because there are millions of files? I wonder if the scan is interrupted properly or not if it’s in the initial “walking” phase. Not at a computer but this is something for some dev to maybe look at at some point…

You may be correct. I have a folder with 27 which is showing as up to date and pause / resuming does appear to update the config.

For me, it’s not so much the number of files as im tied to an external HDD as a snatch and go disaster recovery. So the scans take a very long time, hence asking for the ability to turn off the scans but leave the folders active to receive updates. Once the initial scan is complete St works great, it’s just the 3 days of grinding i’m trying to avoid.

I can’t find it now but there was a discussion or an issue on remembering the last scan time. We would then not have an “initial” scan on startup, we would just scan if the scan interval had passed since last scan. So in your case, set the scan interval to a week or whatever you normally run with and restarts would work. Or zero to disable entirely and then run scans from the API or something.

You can probably check in the browser developer tools to check if the network request issued by pause button click ever completes to prove or disprove theory.

see https://github.com/syncthing/syncthing/issues/5353

1 Like

Ah there it was