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.
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.
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.
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
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.
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 https://pulse-forum.ind.ie/t/the-rest-interface/85 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.
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.
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)
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 http://pastebin.com/NGzPnWk8
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