Reset Sync Folder by Node (user)

Forgive my English.

We have create a fonction : delete folder Index in AppData/Local Before, when we do this, SyncThing do a total reset of folder : delete file not in server, update if different, etc Now, the files are not delete.

Finally, beafore, when a NODE delete INDEX Folder in “username/appdata/local/syncthing/”, it’s make same action OVERRIDE by MASTER. Actually, no.

Have you an idea to correct this problem.

Thx before

Ok, so I try to explain what we need. Do you think it’s possible to have an “OVERWRITE” button on “CLIENT APP”. Same the master choose who want to overwrite, the slave will do the same. I think, imagine he touch anything and want to get a perfect copy of master.

Thx before

So I am not 100% sure I understand the issue.

I think I do understand the request, but I don’t think this is possible, as you cannot guarantee that all nodes are online as you overwrite, plus multiple nodes might call themselves master

We use SyncThing with only one master. Each customer can change his record as he will, but we would like, if the customer makes a mistake, he can choose to return to the state of the server. Erase without asking the master to do so. We use Syncthing on server, so we are online all the time.

edit : Before the customer removed his “Index” folder in username / appdata / local / syncthing This was on the same thing as the “override” function of the master but now it does not work at all.


I’m part of Camarade’s team, as a developper. Let me try to be clear on what we would expect if possible.

Currently, some users are performing changes in their sync’ed folders (they currently have only one - this is not planned to change)… sometimes, they would like to roll back all changes (additions, deletions, and files/folders modifications) they made, and get back to the server folder’s initial state. In our setup, there is only one master, and will be only one.

Actually, the only way to resync completely the user’s folder is to :

  • ask one of our admins to do it from the SyncThing server … (which is time consuming)
  • or locally : to wipe all indexes and delete contents of the folder to sync. Drawback is that user needs to rte-download again all the data, which is bandwidth consuming.

Is there a way to let a user do this, via a REST POST command for example ? Or another trick ? This would result in

  • deleting added files only
  • redownloading modified files and missing files only


So my assumption would be, if you delete the index + files on the clients side, it will start a fresh sync from master, which should have the original state?

If you want versioning, whereby you could do rollbacks for changes, you should just use versioning.

unfortunately it does not work. With the latest version 0.9x, delete the folder “INDEX” file was performing the same operation that the master reset and now not, why and how we seek to find this opportunity.

But thank you for your answers

Audrius, For our system, versioning is not needed, and full fresh sync consumes too much bandwidth. The “override” option (available from server side), but from the client side is the optimal solution we’re looking for. This was working fine before with earlier version (0.9.8), where we had to delete the “index” folder (on client side) generated by SyncThing. Actually, deleting this folder only performs a re-indexing, and does not run the override anymore.

If this is not planned, or even hardly implementable (is this word ok?), well it’s good to know - in order to plan it in our developments.

Anyway, thanks for your time looking at our questions/requests.

If you just want to give the users access to the override button of your server you could use the rest interface “/model/override?folder=default” (not documented here but should be like other POST requests). Write a small script that is available for everybody that sends the request to syncthing on the server.

@Alex : many thanks for the hidden tip ! This is exactly what was needed :smiley:

I am not even sure what override does by looking at it, nor I am sure if it is what you want. It seems to forcefully update the ‘need’ index with ‘have’ index, making it look like its in sync by force without actually doing anything. @calmh probably knows better what it does.

So I guess what you really want, is to bump the local version on master to the highest version seen + 1, so that all slaves would pull the changes (which would basically be the initial state just with a higher version number)? I don’t think we have a use case for that, nor do I think it is planned, but this should be fairly easy to implement, so feel free to chip in.

So I am looking at Trying to workout what has changed, and I cannot seem to see anything. Are you sure the change was between 0.9.8 and 0.9.9?

Between 0.9.8 and 0.10.xx

Uh, that’s a lot of water gone down the river. I’d be keen to fix the old behaviour rather than invent new one.

Does override actually do what you want? If it does, is there any benefit/value of bringing old functionality back?

So, if I understand this correctly, you want:

  • Your clients can choose to revert their changes by redownloading only the modified files.

I think this would be useful in two ways: One: I can play around with my files, and if I want, I can always get to the master state again. Its like a github repo. I can always redownload by command. (Client pull)

Two: I have my own website and i want that all the files on the various boxes are getting my new site and forget about the data which accumulated during using. (Master push)

Exactly ! But :

  • redownloading the modified changes
  • AND redownloading the missing files
  • AND deleting files in the client(s) folder which are not present on the master

and this, available on the “client side”.

So you are saying that previously as you did -reset this is what happened? What happens now? Does override actually do what you want?

Now, when we delete the “RESET” folder, nothing happens. Modified files remain, those added remaining missing files back. Tom thank you for coming, my English is crappy ^^

Audrius, Indeed : previously, only by deleting the “index” folder on client side was doing a full revert of the folder on the client side like the latest master state. I haven’t tested the “reset” flag. UPDATE : tested the reset flag and I got lots of errors Now, by deleting the “indexes” folder, this results in : indexes are only rebuilt and missing files downloaded. But the ones modified or added by user (on client side) are left. I’ve tested override : and this does not what expected. Anyway, I tested it by calling the POST on the SyncThing on the client side … not on the server side - because I don’t want to force a refresh on all clients, but only on the one asking for it.

Maybe a POST function called to the syncthing on the master with parameters like :
&node_id=xxxx-xxxx-xxxx-xxxx-xxxx&folder=MyFolder would do the trick