I accidentally deleted stfolder and stignore, how to restore?

I accidentally deleted my folder marker .stfolder and my .stignore file. I though the folder was not longer used by Syncthing, I was wrong.

Is there a way for to restore them? I would like to prevent having to re-sync all my files. (5000 photos)

Ps. I post this after Googling for 30 minutes. Couldn’t really find anyone with my situation, so I hope this thread can help others in future

The folder is still present on the disk physically, right? Is it also present in Syncthing? If yes, is it currently stopped with an error? If that’s the case, then I’d suggest to change its type to Receive Only to be extra safe first, and then you can just recreate the .stfolder manually. You don’t need to recreate .stignore, unless you actually want to ignore something, but you can always do this using the Syncthing GUI. After doing all that, simply try to rescan the folder in Syncthing to force it to sync again (or pause and unpause it if that doesn’t work).

To answer all your questions, yes, I only deleted the folder marker .stfolder and the .stignore file. Folder/files and Syncthing settings where all intact.

I ended up recreating .stfolder manually and letting Syncthing create the .stignore. Did a rescan and everything was fine, like nothing happened! :slight_smile:

About the .stignore, I thought the .stignore had to be present as a marker too, that’s why I included it in my question. I understand now its only created when you actually use it, which I did.

2 Likes