Database disk image is malformed error in piece_expiration db

i had several databases that were ok according to the integrity check but node complained upon start that the database is garbage.
How can the database checked properly?

Had to repair some and seems to be working great.
Thanks for that.

1 Like

As in the linked guide. You just need to provide a path to the existing databases, otherwise if the database doesn’t exists - it will be created and of course it will pass the check.

That was what happened. I ran find /path/to/storage/ -maxdepth 1 -iname "*.db" -print0 -exec sqlite3 '{}' 'PRAGMA integrity_check;' ';' and did not receive an error on databases.

But when I started the node it complained that a database had an error. So the check has missed something. I had to recreate reps. used that rollback snippet to make the error ga away.

1 Like

This interesting, is it possible that it corrupted the database during the start?