What happens if a folder is deleted under syncthing?

I am new to syncthing so I will word this as best as I can. I have an ubuntu server running syncthing for folder A It is sending all it’s files and syncing with a windows computer running syncthing, let’s call this folder B.

Currently I have set it only one way so that B can take from A but any changes in B will NOT affect folder A on the server.

I do want to open it up to do changes both ways but I have a few concerns.

  1. What if folder B or contents accidentally gets deleted?
  2. What if folder A or contents accidentally gets deleted?
  3. Which takes priority of changes? for example if I am working on a file on Folder B and I save the file but at the same time the server changes the file. Will it be whichever finishes last?

Sorry if these are really trivial questions, I just want to make 100% sure before I open myself to potential disaster due to misunderstanding.

Thanks, Ciaran

Syncthing doesn’t distinguish between “accidental” and “on purpose” deletions. However, if the whole folder is deleted and the path is no longer accessible by Syncthing, the synchronisation will automatically stop. If only the contents are deleted, then the deletions will also be pushed to other devices.

Syncthing syncs changes as it sees them*. If the same file has been modified on multiple devices simultaneously, it will create conflicted copies of that file. By default, there is a limit of 10 conflicts per file.

*There are some exceptions like deletions delayed by 60s by the file watcher, but you should really read through the Docs if you’re interested in such technical details.

I’d suggest to at least enable File Versioning in Syncthing, and also perhaps use another fully-fledged backup solution (which Syncthing is not) to keep the files stored in a safe, separate location.

This was incredibly helpful thank you so much.

No I’m not using it as a backup I’m using it to interact with server configs and just have a local copy that’s up to date to be able to work on. Yeah I will have a proper read through the documentation tonight.

Thank you once again, Ciaran