half-master behaviour and avoid certain overwrites...

Hi,

I have a server where files are created and spread across “clients” using syncthing. On those clients, workers open the files and work on them. As a result, new data files are generated and uploaded to the “server”. Nevertheless, one of the synced files from the server is a xml containing a route to other files of the kind “\SERVER_FOLDER\file1.txt” that, once opened on the client becomes “C:\CLIENT_FOLDER\file1.txt”. Then, syncthing detects it as modified and uploads it again to the server which will no longer detect “file1.txt” location as route is mofified.

Basically, what I want to do is to avoid just those xml (they follow a pattern) being updated on the server side. Is this possible or I just need a script running on the server to detect such changes and reverting them back to normal?.

Thanks in advance,

Jose.

Maybe a common variable on each node would exempt you from changing the file on client side.

1 Like

Check documentation for ignores.

1 Like

Oh my god, I am sorry, I don’t know why I thought “Ignores” where two-way… grrrr. Even when I myself copied Ignores by hand on each node for certain files…

It is clear that I just need to add such Ignore on the client side. It won’t prevent files generated on the server to be replicated to the client, right?. The only issue here is the “sync” status showing on the clients… it will confuse users…

Thanks a lot.

So no, you can’t have partial one way sync of a file. If you don’t want the file modified on one of the nodes ignore it, but that doesn’t mean others will be enforced to use that version. Ignores simply means the file does not exist. Perhaps you should split your stuff into multiple folders or mark the file as read only on the OS level.

I see… The problem is that when new pattern-matching files are generated on the “server”, I want them to be replicated to other nodes…

So I have to go to the scehduled task on the server that corrects file contents… not a big problem.

Thanks again

Or you would use a custom versioner perhaps, which waits for that file to change and reverts it.

That is another possibility, sure!

1 Like

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