Sync any given file only once?

Just some info on the setup I’ve currently got: I’ve got two devices, my Windows PC and an Android phone. They are both sharing a folder, with the PC only receiving and the phone only sending. I’ve set ignoreDelete to true for the folder on my PC.

Say, the folder on my PC is getting a bit cluttered/disorganised, and I want to move the files from that folder into a separate folder elsewhere. If I do this, then Syncthing will recognise that my phone is more up to date than my PC, and re-send those files again.

In this case, I don’t need those files again, because I still have the files, I’ve just moved them elsewhere.

Is there any way to get Syncthing to not send those files again, and only send new files that it hasn’t synced before?

Edit: I just noticed that if I delete a file from the shared folder on my PC, it doesn’t automatically re-send from my phone, but instead will change the status of that folder on my PC to “Local Additions”, and give me the option to “Revert Local Changes”. Only if I click “Revert Local Changes” does the file get restored from my phone to my PC.

This is closer to the behaviour that I desire. However it leads me to three further questions:

  1. Is there any way to remove the “Revert Local Changes” button? From my perspective, this can only serve to produce undesired results. I.e. I may accidentally click it, and then all those files that I removed from the folder on my PC get re-sent from my phone.

  2. How persistent is this state? I.e. Are there circumstances that might cause Syncthing to no longer see the removed files as “Local Additions”, and instead see it as out of sync, and cause the files to be re-sent anyway? I would wish to avoid this if feasible.

  3. If I want to reinstall Windows on my PC, would it be possible to maintain this log/record of what the local additions are? I.e. After reinstalling Windows and Syncthing on my PC, could I get it to continue to see the missing files as local additions, instead of non-existent files that need to be sent over?

Thanks everyone!

1 Like

You are trying to use a bidirectional sync tool to transfer files one way, this will not work.

Revert local changes means syncthing will never ever touch those files again. So you deleted file foo which lead to that button appearing, now if you ever recreate the file foo on the phone it will never sync. Also, the completion status might go wonky, so you’ll never know when it’s wonky because of what you did, vs wonky because it’s actually failing to sync stuff. Because you use ignore delete, sensible completion status is off the table for you anyway.

There is no way to hide the button.

In theory local additions are in the database, so if you reinstalled windows and copied the database it might work, but again, you’re shoe-horning syncthing into something it’s not meant to do.

Effectively, if you reorganize files, let syncthing reorganize them both sides and let syncthing sync both ways as it’s meant to.

That’s unfortunate to hear, thanks for your response though.

It’s a bit confusing to hear that Syncthing cannot work to transfer files one way. Unless I’m misunderstanding something, that’s effectively what it’s doing under my current configuration (by having set the folder as ‘receive only’ on one device, and ‘send only’ on the other). If that’s not what those options are for, what is the correct/expected use case for those options?

One way is fine. It’s the not-actually-syncing-at-all bits that are antithetical. (I.e., our “ignore deletes” option that maybe should not have existed in the first place, and the part where you want to remove a file while also having that file synced.)

1 Like

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