How to restore from .stversions

I would like to restore some files that have disappeared, but have similar file names in the folder .stversions.

I tried renaming the files in .stversions to give them the proper extension but the proper program to open the file gave an error.

I have looked on the web interface, in documents and searched the forums for ‘syncthing’ plus ‘restore’ and ‘revert’ and the results mostly show scripts produced by other people or completely irrelevant results.

Is there a simple ‘restore’ function button I’m missing?

It’s a great program, but I need to know how to restore files. At the least I would find it helpful to have a section called “restore” or “revert” for instructions in the documentation. It would also be helpful to have a section like “reasons files fail to be restored.”

Thanks in advance for any help you can provide.

John in Oregon

No, sorry.

You simply copy them out using your favourite file manager, possibly renaming the file in the process if necessary.

I’ve never heard of any (nor can I really imagine any; files are simply moved into .stversions and optionally renamed, so the contents are what was in that version), sorry… :disappointed:

I got it, thanks for the help. I didn’t realize I couldn’t just rename and open the file from within the .stversions folder. I literally had to move them out, then I could view or rename. I must have missed that in the documentation.

Hi, I just setup syncthing and set up a shared folder between several computers (my linux laptop and two windows 7 PCs). I also set up staggered file versioning for the folder. Then in the process of moving folders about on one of the Windows laptop, I managed to delete a folder that was inside the synced folder. I want to restore this but having checked the synced folder on all 3 computers there is no sign of a .stversions folder (even after showing hidden files). Is there anything I could be missing here or is this a bug? Cheers, Nick

Has the deletion been synced been to the other machines? Did the other machines have a copy of the deleted file, before it was deleted?

Ok so I’ve just checked again and one of the windows PCs did properly back it up into .stversions; it was on this linux laptop where it did not back it up properly. On the Windows PC where I’d made the changes there were no backups, but I guess that’s normal behaviour - however the deletion did occur as a result of conflicts between different syncs: i.e. on at least one of the syncing computers, one folder being synced was inside another folder being separately synced. I wonder if Syncthing should warn if a user tries to setup a sync in that case as this is likely to cause complications? As for this linux laptop - definitely there were copies of the deleted file on it before deletion, which was synced from another machine. Unfortunately since I’ve now changed the directory location and had to recreate that sync in the process I can’t check what my settings were - so it is possible I’d forgotten to set versioning up properly. Still, I guess the potential for sync conflicts to delete files is maybe something worth looking at.