Pause sync when a certain file is present

Hello! I’d like to sync large trees of data for some applications between two computers. While not a particularly hard task, I’d also love to avoid syncing data when the application using it is running. The best way to achieve this would be to detect the presence of a given application’s lock file in its data directory and disable sync while one is present, however I haven’t found a way to do that in Syncthing. Is this supported? If not, could support for this be added?

I’m also open to alternative solutions for this problem, including recommendations for other syncing software that supports this.

Its not supported and support cannot be added.

The alternative solution is to write your own application that does detection and uses the rest api/cli to pause/unpause folders.

If the application removed a file when it was running, you could point syncthings folder marker to it and it would stop as the file disappeared.

Thanks for the reply! None of the applications that I intend to sync remove folders or files when running, so I won’t be able to use the .stfolder trick. Waiting for lock file creation and pausing the synchronization when it appears seems to be my best bet now, thanks for the suggestion.

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