Removed folders dont sync again from master

I mainly use Syncthing as a means for transfering my photos from phone to laptop with little intervention from my part - just set it up and let it do the magic :slight_smile: And it worked until the moment when my phone got full. So I had to remove some data and since the photos were already synched to the laptop I decided to remove a lot of them from the phone. Phone folder is the default photo folder set in master mode. So my idea was to move the files on the laptop to another location (subfolders together with files within them), remove files from the phone to free memory and let syncthing resend the remaining files again from the phone (since it was set in master mode). Which did not happen at all. None of the old files remaining on phone got synched back to the laptop. Also a photo I took later was scheduled for synching but did not succeed since the folder it shoud go to was not there any more. I manually created that folder expecting all files that should be there to sync but only that last photo got synched.

This is not the way that master folders should behave as I read in other threads. Am I doing something wrong or syncthing does not cover that scenario?

You have to override changes made on the laptop for stuff to be recreated on the laptop.

If you are using the official Syncthing Android App, you need to use the Web UI, as the App itself does not provide the “Override Changes”-Button.

So it is RTFM issue again :slight_smile: The text of that option is not clear at all.

But I see only one use case for that specific option - you want to keep some devices to have some specific info and only that info. So setting a folder as master should automatically keep all devices in sync with the master whatever might happen on each of the other devices. Otherwise you allow colaboration between the other devices until some future moment when you decide that ALL the other changes are irrelevant and override them all. What if some ot the changes were need and other were not?

Well, copy files you want to keep to master by hand.

Consider this issue closed. I will try to propose a feature request or something based on the use cases I stumble upon. Thanks for pointing to docs.

for the button see #396 in syncthing-android

I now understand how “Master folder” work and what that “Override changes” button does. Since I dont see any other use case for such an option other that I mentioned before I dont see why it behaves like it does and you need to override changes and they are not just reverted automatically.

Also that was not the behavior that I (and probably others) expected seeing MASTER in options name.

There are more than one thread on the forums which talks about this, and explains why it is the way it is. If it was automatic and immediate, immagine two nodes, both set to master, overriding each others changes over and over, consuming all bandwidth of the universe, making your ISP go bust.

Or someone accidentally enabling the master setting in a cluster of a bunch of boxes, and everyones edits everywhere from that point on being blown away automatically until the culprit is found.

The “Master” checkbox is about protecting the device that is master from unwanted modifications. It’s not about continously enforcing that state on everyone else.

To prevent local modifications on non-masters, use file system permissions.

To get unidirectional enforced sync, use rsync -a --delete which does this perfectly.

If now it is possible to have to nodes set to master do they sync with each other, or each of them can enforce it’s changes to non master nodes? I don’t think that it should be possible to have two nodes set as master simultaneously.

You can do that, but it’s only rarely useful. Both masters will ignore changes made by anyone else (including the other master). Any changes made on the master will propagate to the non-master devices.

It could potentially be useful if you have two devices “generating” files (surveillance cameras, maybe? weather stations?) that should be synced to other devices, but no changes should flow in the other direction. It seems simpler to use separate folders for that case though.

I just tried it and two master wont work (I duplicated a file at non master node and then enforced changes from master. New file was removed). Since Enforce changes also deletes files non existent in the master each of them will remove the others changes and only files that ar present in both master will remain.

Yes. Two masters can never sync with each other. Master means do not sync from anyone else. But other devices could, potentially, pick up changes from the two of them.

I said it would only rarely be useful.

What I meant that if a groop of nodes has more than 1 master only files that exist on all of the masters could be expected to be fould on non master nodes. But since you can’t sync masters with time those files will be less and less, unless you distribute them between masters by some other means.

I’ll start by repeating I don’t think having more than one master node is useful or sane in most cases.

However, you could have something like this.

“Master one” creates files daily. Reports, or logs, or something. They are called “report-1”, “report-2”, … and so on. “Master two” creates other files on a regular basis. They are called “video-1”, “video-2” and so on. There is zero interest to have the reports synced to master two, or the videos to master one.

However a third box (not master!) would receive the complete set of report files, and the complete set of video files. In essence a “merging” of the two master devices. If the report master removes a report, it is removed and so on. This could be useful.

The two master devices will always appear out of sync, and you should never press the “Override” button, but that’s the nature of things.

Wheter it is sane is diferent question. Most people want a TV remote :slight_smile: So if it can happen it will.

That is a real scenario but in this case there should be option to disable Override changes button or at least “are you sure” verification. Otherwise if one of the masters overrides changes by mistake then the non master folder should be recreated from start in order to be able to receive all the files from both masters.

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