Syncing a subset of a directory - possible?

I have two large desktop machines w/ terabyte+ drives, one at home and one at my makerspace studio, which I keep pretty much everything in my /home synced between them. Barring power failures and the occasional reboot, they are always on.

I also have a laptop, which is off most of the time, that I use as a travel machine when I need to do stuff away from my main machines. This machine has a much smaller drive, so not possible to sync everything with it.

Like I’d imagine most of us, I have a lot of older stuff in my directories that I probably would never use on the travel machine, and other stuff in the same directories that I’d like to have synced on the travel machine…

Is there a way to set up ST on the travel machine so that it only tries to sync a subset of a directory - i.e. only say ~/documents/projects, but not ~/documents/taxes, if the entire ~/documents is synced between the main machines?

I’d much prefer not to have to increase the already annoyingly large set of directories to sync that I have on the main machines…

Thanks, ex-Gooserider

The docs already covers these scenarios.

Yes, if ~/documents/ is the root of the directory being shared, and ~/documents/projects/ is what you want on the laptop, the following ignore pattern is one way to do it:

!/projects
**

Line 1 explicitly includes the “projects” directory while line 2 blanket excludes everything else. When there’s only a small set of directories of interest, it’s often simpler to maintain versus trying to individually exclude everything that’s not wanted.

In Syncthing’s web GUI, enter the pattern above in the “Ignore Patterns” panel under the folder settings or manually create the .stignore text file.

For more details and ways to exclude certain types of files, see the “Ignoring Files” manual page: https://docs.syncthing.net/users/ignoring.html