I have read the FAQ, but the FAQ only says “you can nest shared folders if you know what you are doing”. Well, how do I learn enough to nest folders successfully?
My use-case is the following:
I have a “master” machine, that is my laptop, and in my ~/Devices/ I have full copies of my mobile devices synced by Syncthing:
~/Devices/Phone1
~/Devices/Bookreader
~/Devices/Phone2
I want a folder, say, ~/Work to be available on all those devices:
~/Work
~/Devices/Phone1/Work
~/Devices/Bookreader/Work
~/Devices/Phone2/Work
When I had only two devices, I just made ~/Work to be a symlink to ~/Devices/Phone1/Work.
However, with multiple devices this does not seem to be possible.
My initial idea was to run Unison locally on the laptop, and tell it to sync ~/Work.
This should work if the laptop is always running, but requires a separate tool, and would not work if the laptop is turned off, but Phone1 and Phone2 are connected to the same network.
So, is there some marvellous Syncthing trick to sync that ~/Work folder?
This is the way to go. I would also suggest ignore the “Work” folder on your mobile devices as it sounds like it will be a nested folder in your main folder that is synced to the laptop. I do more or less the same thing on my phone.
I can’t “not do this”, because this is precisely what I need. I find it really convenient to have a full copy of each device internal storage under ~/Devices/.
But I also need to have a copy of Work on each of those devices.
You’d need a total of four Syncthing folders on your laptop – one for each mobile device plus the multi-device Work folder.
If your mobile devices are set to “Send Only” to your laptop which is “Receive Only” for all directories except the Work folder, then managing the ignore patterns only on the laptop will be fine. Under the Syncthing folder root for each device you’ll have a .stignore file:
Now you can set up and share Work on your laptop in a bidirectional sync with your mobile devices.
The “Bookreader” Syncthing folder on your laptop will exclude the Work directory on Bookreader’s internal storage, while a separate “Work” Syncthing folder will take care of only mirroring the Work directory between Bookreader and the laptop. Same goes for the other mobile devices. Repeat for the other devices.