Extracting file deletion log from the database

I lost some files due to a syncing mistake by me. Unfortunately, Syncthing wasn’t running with --verbose and --audit flags, but I really want to find out what files were deleted.

So I found a post about extracting that info from the database, by @AudriusButkevicius here. I’m an amateur programmer and have never worked with Go or databases yet. Could someone please help me with this?

Something involving syncthing cli debug index dump | grep Deleted could maybe help you? Some more investigation and targeted grepping needed of course. Run it while Syncthing is stopped.


That’s great, thank you. Though, I should grep for Deleted:true. I’m doing some investigation on the output of that command since it’s a bit messy.

Does this command read from the database? For how long are file operations info stored there?

It’s not file operations, but the final state reached. And for deleted items, I don’t think there is an automatic expiry mechanism. They just stay there as records with Deleted:true indefinitely (until the same path is added again or the DB is reset).

1 Like

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