What's in the index-v0.14.0.db/LOCK file?

Hi everyone,

I’m using an automated backup Tool and when it comes to backup the Syncthing folder in the Users folder there is one file that cannot be read (and not backupped). It’s the LOCK file… When I stop Syntcthing it can be backuped…

What information is in this LOCK file and is it important for setting up Syncthing after the reinstalltion of Windows and Syncthing?

Thank you for your help Markus

This file indicates that Syncthing is currently running and the database is “locked”. You actually should not back it up in this state. My suggestion is to either back the database up after shutting Syncthing down, or not backing it up at all (as Syncthing will recreate it from scratch if it doesn’t exist).

I think the only case, where you absolutely do must back the database up, is when using things like ignoreDelete.

1 Like

Thanks for your reply and explanation…

So when the database doesn’t exist (but all the rest of the Syncthing folder), Syncthing knows which local folders and machines are there and will scan the local folders again to build a new databse? And than will talk to the other machines to find out if there are differences to sync?

Basically, yes. When restoring Syncthing without the old database, I also tend to temporarily set all folders to “Receive Only” just to be extra sure. This can be done in the config.xml file before starting the program.

1 Like