Nested Folders and .stignore

Hi,

I have a setup with two NAS and several mobile devices. I want that the NAS devices sync everything to each other while the mobile devices only sync some specific folders to both NAS.

First idea and current setup is following: /data is synced from NAS1 to NAS2 /date/aaa/, /data/bbb/, /data/ccc/,… is upload only from mobile1 to NAS1 and from mobile1 to NAS2 (not from NAS1 to NAS2)

At first it looked fine, but later I often got conflicts. As mobile1 uploaded a file /data/aaa/x on NAS1, this file was synced via the /data/ sync to NAS2 and then there was a conflict between NAS2 and mobile1 as both already have x.

So this nested setup was not the best idea it seems.

So what would be a better approach for this?

I want that everything in /data/ gets synced between the two NAS devices, but only some specific folders inside them to my mobile devices, some of them as send only from mobile. I want to sync it to both NAS, as it could be that one NAS is not reachable due some network restrictions.

One idea: Add to the /data sync between the NAS devices a .stignore for all folders already synced to mobile (/data/aaa/, /data/bbb/, /data/ccc/,…) and sync them “directly” also between NAS1 and NAS2?

Any better way to archive what i want?

Thanks, crispyduck

Why don’t you link NAS1 and NAS2? That would relive some load from your phone, as blocks already synced to one NAS can then be obtained from there as well as from the phone.

You shouldn’t get actual conflict copies from that unless there is a real conflict, i.e. the files actually differ. It will still create a bit of additional churn, as it needs to check whether the files are identical, but that’s it.

That should work and remove the churn mentioned above. However again it should also work fine without the ignores. And if you ever want to sync the full /data with some other device, with the additional ignores you can’t just sync only the /data folder, but need to sync all of them. Not sure whether that’s a concern for you.

Hi! And thanks for your answer!

Thought it is already linked via the /data/ link between the two NAS. And the phone will only see NAS1 on the local Lan as the FW will block it form everywhere else. Same for NAS2. So if the phone is in NAS1 Lan, it can only see NAS1, if it is in NAS2 Lan, only NAS2. Only NAS1 and NAS2 see each other and would sync via the /data/ link.

You mean I should also link the subfolders between the NAS? So like this?:

/data/ NAS1 - Nas2 /data/aaa/ mobile1 (send only) - NAS1 - NAS2

Thought this will confuse Syncthing on the NAS as it has the same files two times in different links.

Ok, seems I only get this conflicts on Whatsapp dbs. (msgstore…db.crypt12) photos,… seems to be fine.

Any Idea why only these files are making problems? Btw. on the phone I use the fork and syncthing only runs when charging.

That was the reason why I have done it as it is actually. I thought I can so later sync full /data/ with e.g. my Laptop without the need to add also all subdirs.

Br, crispyduck

Any idea why I habe this problems only with the WA DBs?

I don’t really know what you mean by confused. It will work, and this link will not make things worse. I believe it will make things more efficient. Thus I would recommend it.

No idea about the dbs. Well it’s usually a bad idea to sync databases, however as they are only ever opened on one end here I wouldn’t expect problems

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.