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

Hey all, I also have deleted my .stfolder not knowing what it was. When you say you manually recreated the .stfolder was that just by creating a folder and naming it .stfolder?

I am not @FlyingNimbus , but yes, that’s how you do it.

Thank you!

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