The NAS is permanently online, so I always place the NAS between the PC & Laptop when syncing (the Laptop & PC never sync directly to one another).
I am using Linux, so everything worth backing up is under /home/username.
There are 3 categories of files & folders in my /home/username folder:
Profile Data (Desktop, Documents, Music, Pictures, Videos, Projects, etc.)
Local Config Data (.config, .local, some of my own folders as well, etc.)
Other system dotfiles & folders
There are too many folders to create and maintain a separate shared folder for each of them (across devices), and all the above folders are inside the same parent directory /home/username, which only supports 1 .stignore file.
For both the PC & Laptop, I am looking to set each of them up in the same way, as shown below:
Are the devices listed under “Local Config” correct? The folder type is “Send Only”, but the desired setup implies “Send & Receive”.
PC and Laptop aren’t peered, so you’ve got a hub-and-spoke topology with the NAS at the center. PC and Laptop can send-only to the NAS if the two aren’t syncing their configs with each other. But if they are, then the sync path is PC → NAS → Laptop and Laptop → NAS → PC (requiring send-and-receive).
I use the ‘Local Config’ as ‘Send Only’ because there are some slight variances across configurations between the PC & Laptop due to hardware/compatibility. ‘Send Only’ allows me to manually copy the relevant files when needed.
Linux, and I believe MacOS alike, place all user data and configuration in the /home/ folder. So if I sync the entire folder, then I can’t selectively choose on the receiving device what I want to download, so I’m forced to accept the entire /home/ folder, and all of the contents will also have the same ‘Folder Type’ i.e. Send & Receive - which is quite a dangerous way to expose the /home/ folder in my view.
If I could split the /home/ folder into categories (similar to the table in my main post), then that would not only be more efficient from a data transfer standpoint, but also more secure.
As far as I’m aware, Syncthing uses a 1:1 mapping between folder:stignore file, which means that I cannot create 3 folders inside Syncthing, point each of them to /home/ but provide a different .stignore pattern to each of the 3 folders.
If that was possible… it would solve all the challenges I’m currently facing.
There are no good workarounds here. For different sharing modes you need different folders. Different folders will currently share .stignore if they share the physical directory. We could probably fairly easily allow to customise the ignore file name, or use something like .stignore-$folderID by default with a fallback to the old name, though. (Other, better solutions like adding the ignores to the config itself are tricky since we support includes and stuff.)
Multiple .stignore-$folderID would also be very easy to manage and backup.
Personally, I wouldn’t worry about this at all. For me, the .stignore-$folderID would be the superior solution.
I love how Syncthing has the .stignore file in the physical directory, as well as the trash and previous file versions. This means that I can easily get a pulse-check on Syncthing directly from the file explorer.
Configuring multiple Syncthing folders is unavoidable because of the different sync folder types (e.g. “Send Only”, “Send & Receive”) desired, but since you’re using Linux, the rest of the wish list is doable.
First, create a basic directory tree similar to the following:
/mnt
└── username
├── Local_Config
│ └── home
├── Profile_Data
│ └── home
└── Sys_Files
7 directories, 0 files
It doesn’t have to start under /mnt, and only requires enough storage capacity for the .stignore files (assuming Syncthing’s versioning feature isn’t being used).
Then configure three Syncthing folders using /mnt/username/Local_Config, /mnt/username/Profile_Data and /mnt/username/Sys_Files as the target paths along with the desired ignore patterns. The directory tree now ends up like this:
Workaround I asked for… and workaround you delivered! Actual footage of me right now :
I have set it up as per your instructions and it works, thank you!!
@calmh another grateful squirrel is coming your way as well for the .stignore-$folderID. Is there anything that we can we do to help get an official implementation of your proposed solution as well?