Database error

Hello, love the product. I’ve started developing an error saying Database Indirection GC Failed.

Just wondered if there was a way to fix or reset or resync from scratch. I just don’t want to have to set everything up again.

Thanks Simon

Please make sure that your disk is in good condition, because these kind of errors are usually caused by faulty hardware. An unstable OS could could also potentially lead to such issues.

I don’t think there’s anything you can do other than reset the database though. You don’t need to re-sync the files from scratch, however. What I’d do in such a case is to change the type of all folders to Receive Only first, then shut Syncthing down, then reset the database (either using the -reset-database flag or simply by deleting the folder), then restart Syncthing and let it scan everything and exchange the indexes. Once that step has finished, you can check the folders and either revert local changes where needed or, if everything’s all right, just change the folder types back to the previously used ones.

Still, the above should be done only if you’re 100% sure that the hardware is working as intended, because if it’s not, then the errors will come back eventually anyway.

Thanks for that. Could you tell me where the database is located.

Or how to delete it?

Thanks Simon

ps I like the idea of it just reindexing from scratch.

This depends on the operating system and also how you’ve installed Syncthing in the first place. Normally, you can just shut Syncthing down, and then run syncthing -reset-database from the command line. Otherwise you can find the index-v0.14.0.db folder in one of the folders listed at https://docs.syncthing.net/users/config.html.