"Read only" setting

What does making a repo “read only” actually mean?

Specifically, this: if I have my main work computer and a server, and I want all the changes on my main computer to be synced to the server, but I do not want changes on the server to be synced to my main computer, is that doable? Is it doable with the “read only” setting? And which end do I mark as read only?

Yeah, this is known to be confusing. Post-0.8.4 (i.e. not yet released) the wording is changed to the following:

So the “read only” check box is now called “repository master” instead and has a descriptive text. To answer your question, you want to check “repository master” (i.e. “read only” in 0.8.4 and previously) on the main computer (“exporter” of changes), and not on the server (“importer” of changes).

I had a surprisingly hard time coming up with something to concisely and unambiguously describe this. Suggestions are still welcome.

It is a tough problem, isn’t it? Your description has made it clear to me, but I can see why you’d want something else :slight_smile: “Sync from here only”, or “only allow local changes, not synced changes”, or similar.

Stupid question: imagine I have a repo on the main computer, marked as repository master, and that’s synced with a repo on the server.

If I change maincomputer:repo/somefile then that change will be synced to server:repo/somefile. Good.

If I change server:repo/somefile then that change will not be made to maincomputer:repo/somefile. Also good.

If I then change maincomputer:repo/somefile again, will it overwrite the change made locally to server:repo/somefile? I would expect the answer to that question to be “yes”, as a data point.

Yes, it will be considered a newer version and will overwrite the file on server.

I wonder: after this second point, will the change be canceled by resending the “somefile” from “maincomputer”? Why no?

I didn’t understand the usecase for a “master” repro.

But a “read-only” repro is a usecase for a backup repro. e.g.:

  • get newer files from other nodes
  • ignore local changes (never send changes)
  • ignore file delete from other nodes

But this is only a use case until we have versioning: https://github.com/calmh/syncthing/issues/218

No, because the file on server is a newer version, it’s just that maincomputer doesn’t accept it. When the file changes next time on maincomputer, that is the newer version and will overwrite server.