Force sync/ overwrite remote folder

I mean, force use local folder overwrite remote folder.

I have changed Folder Type to sending only , but the Global State doesn’t match Local State


A sending device cannot force a receiving device to accept all changes – a receiving device can have its own ignore patterns, there might be local changes, etc.

If you want the remote folder (device “B”) to purge all differences, set device A to ‘Send Only’ and device B to “Receive Only”. Anytime device B has local changes, Syncthing on device B will prompt for user attention with a [Revert…] button.

You’ve got ignore patterns so the global state won’t match the local state (i.e., files filtered out by ignore patterns + local state = global state)

Only the ignore patterns affect global state ? What if I manually add some file in same folder of device “B”

Because I am coding same project on both devices, they share same data folder(in my post), I mainly use device A to create files in data folder, but need run some testing on device B which may create files and pollute the data folder and cause confliction.

That’s why I need an overwrite(omit ignores and skip same, sync and purge not existing) method.

Then if A and B are sharing the same Syncthing folder, the global state will reflect the additional file.

Global state is the count of all files and folders between all devices sharing the same Syncthing folder. Local state is what’s left after factoring in exclusions, etc.

Not sure I understand what you mean by “sync and purge not existing”… Do you mean purge files/directories that exist on B but on A?

Yeah, exactly. This way can keep my data distribution safe.

Maybe device B should be a receive only folder. Then when you need to purge and resync to make device B look like Device A, you can go into the syncthing UI on device B and tell it to discard local changes and make device B look like the global state.

This can only be done from device B. Not from device A.

1 Like

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