Replacing existing Nextcloud syncing

I’m currently syncing folders on my Windows PC with Nextcloud in a docker container on an unRAID server. NC offers much more than what I need and needs a bit of maintenance, so I’m thinking of moving to Syncthing.

I’d like to find out how to replace my existing NC syncing with Syncthing. Currently the unRAID server holds all my work files, more or less organised as Work/Client/Year. Depending on what I’m working on, I sync a subset of all the work files with the PC. So the server might have clients A, B and C, with years 2021-2023. On the PC I might have only Work/Client_A/2022, Work/Client_A/2023 and Work/Client_B/2023. I assume Syncthing can do this?

What I’m more nervous about is the initial setup. I’d like to point Syncthing at the existing folders, but how do I tell Syncthing that the server is the “master” device and that the PC should hold only a subset? My worry is that Syncthing will compare the existing files on the server against those on the PC and decide to delete whatever is on the server but not the PC. Or, potentially problematic because of disk space, Syncthing might copy anything that is on the server but not the PC, to the PC.

I’m sure there’s a way of doing this, but couldn’t find anything that seems to address this directly.

Kinda but not really. This is probably Syncthing’s biggest weakness.

Syncthing doesn’t understand the concept of selective sync. It’s a weakness for the arrangement you are considering.

It can sort of be done with ignore patterns but it really isn’t designed to do what you want it to do. There have been multiple discussions about this in the past and some starting attempts (including a recent set of pull requests) but nothing has made it into the mainstream syncthing yet.

This is not an easy thing to implement, but I do wish someone with more intimate knowledge of the code would take a serious crack at it.

Some discussion about it here:

Ignore patterns can work for this scenario, however it depends whether you want to set them once and forget, or whether you need to fiddle with them often. The latter can be cumbersome, e.g. as ignoring files doesn’t remove them locally, and if that’s your goal, then you will still need to delete them manually.

Of course you can always configure different sync folders per year / client / whatever, then share only with the devices that need them. Just an alternative approach to ignore patterns within one big shared folder.

As for initial sync of existing folders, Syncthing will merge whatever it finds on both sides, but not delete anything during first sync. If a files disappears after it was previously seen on the same device, that’s when a deletion will be synced to other devices. To control what is or isn’t received from the other nodes, you can set the ignore patterns right when configuring the folder on a device, before it even starts syncing / scanning.

1 Like

Thanks for all the responses. Looks like Syncthing doesn’t quite fit my use case - no disrespect intended.