I worked on my sqlite Database with the program "SQlite Database Browser". The program crashed and I lost my changes. But the db-journal file is still there. How can I recover the database with the journal file? When I open the database with the SQLite Database Browser the old database opend.
What can I do?
Thanks :-)
Unless you enabled Write-Ahead logging, I'm afraid that your changes are probably lost. The default journalling system in SQLite works in the opposite way than you are expecting.
From the documentation:
The traditional rollback journal works by writing a copy of the original unchanged database content into a separate rollback journal file and then writing changes directly into the database file. In the event of a crash or ROLLBACK, the original content contained in the rollback journal is played back into the database file to revert the database file to its original state.
See:
WAL: https://sqlite.org/wal.html
File formats, including journals: https://sqlite.org/fileformat.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With