nested folders concurrent sync to several devices

I’m looking for advice on how to safely structure my Syncthing setup.

My goal is:

  • PC ↔ Server
  • Phone ↔ PC
  • Phone ↔ Server

Ideally, my phone data should be available on both my PC and my server, while some other data only needs to sync between the PC and server.

I previously tried using nested Syncthing folders, where the phone’s synced folder was located inside a larger folder that was syncing from my server to my PC. This caused a problem: the PC had not yet finished syncing the parent folder from the server, but the phone had already started syncing files into its subfolder. I believe this resulted in files on the phone being deleted or otherwise lost because the PC’s copy of the parent folder was still incomplete.

Fortunately, I have offsite one-way, never-deleting btrbk backups, so I wasn’t concerned about permanently losing any data and was able to recover what was needed. Still, I wanted to mention this as a word of caution for others: using nested or overlapping Syncthing folders can apparently lead to unexpected and potentially destructive results, especially when one device is still catching up and does not yet have a complete copy of the parent folder.

Would it make sense to introduce YET ANOTHER safety mechanism in Syncthing for this kind of situation? For example, if Syncthing detects that one shared folder is located inside another shared folder, could it prevent or pause synchronization of the child folder while the parent folder is still syncing or otherwise incomplete? I am thinking of experimenting with maxFolderConcurrency=1, but i don’t like the idea of having impact on other use cases of course.

I’ve had the best results by using my server as the hub in my syncthing architecture. The computers and phones in my household do not directly sync to each other.

If you want to use nested folders, you absolutely must ignore the nested one inside its parent when syncing both between the same devices. Otherwise, you’ll end up with both of them trying to sync the same files simultaneously, which can only lead to dire consequences :sweat_smile:.

I know you’re asking for Syncthing to do something like this automatically, but there’s no such mechanism in place currently, and I doubt it will be implemented any time soon, especially since we discourage using nested folders in general.