Sqlite corruption after 3.18.1 update
See original GitHub issueIssue Summary
I’m seeing ghost update
fail trying to bump from 3.17.1 to 3.18.1, something in the migrations seems to munge our sqlite db. The update offers to roll back to 3.17.1 but that doesn’t work, as the db is left in a unusable state.
To Reproduce
cd /var/www/ghost && ghost update
The intial error message after that suggested running journalctl -u ghost_ideas-rejuvenation-com -n 50
(should say to that with sudo?) which returns
Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?
Technical details:
- Ghost Version: 3.17.1
- Node Version: 12.18.0
- Browser/OS: Ubuntu 16.04
- Database: sqlite
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Recent News - SQLite
SQLite version 3.34.1 is a patch releases that fixes a possible use-after-free bug that can be provoked by malicious SQL. Other minor issues...
Read more >Recent SQLite News - Hwaci
SQLite version 3.18.1 is a bug-fix release against version 3.18.0 that fixes the auto_vacuum corruption bug described in ticket fda22108.
Read more >chromium / external / github.com / sqlite - Google Git
... constant-refactoring-in-triggers · constraint-error-codes · copy-optimization · coroutine-autoindex · coroutine-refactor · corrupt-schema · cost-est ...
Read more >Bug #1523291 “Unable to Connect to Database Error with Kobo”
That sort of error usually means the there is a problem with the database on the device. It is corrupted in such a...
Read more >How to recover a corrupt SQLite3 database? - Stack Overflow
UPDATE: There is now an automatic method that is built into SQLite: .recover. Sometimes, the corruption is only or mostly in indexes, in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tobiasboyd the changes in that commit actually convert relative sqlite paths to be absolute, so you’d essentially be manually applying the changes 😄. If you do that prior to the changes in that commit shipping, then once a new version of the CLI is released it will ignore your absolute sqlite path
Sorry, I moved the issue and then got distracted before I finished writing a comment.
This is caused by having a relative path in your config, as Vikas said we’re not quite sure why it broke recently yet. The workaround is to change the path to your sqlite DB to be absolute in your config as seen here: https://forum.ghost.org/t/unable-to-upgrade-ghost-from-v3-16-1-to-v3-18-0/14836/5
I’m gonna close this now as it’s fixed in master by https://github.com/TryGhost/Ghost-CLI/commit/3f07b05a63cbaa94dd02a26b66a83901e0bdab3c, but thanks for the nicely written report 😃