Error: SQLITECORRUPT: database disk image is malformed ...at Database.prepare (better-sqlite3) FATAL: Cache DB init failed — exiting
4 replies
Chris wrote:
You didn't break anything, and your media files are completely safe — this is just Tdarr's own little settings database getting scrambled during the update, which happens once in a while and is fully recoverable. SparkBox quietly saves a backup of Tdarr's settings right before every update for exactly this, so there's nothing to rebuild. In your SparkBox terminal, run: sudo sparkbox restore-tdarr It swaps the good backup back in (your current one is kept aside first, so it's reversible) and restarts Tdarr for you. Give it a minute, then reload the Tdarr page and it should come back up. If it still won't start, just tell me here — I've flagged this one to Tom, and he'll get you the exact next step.
jessic wrote:
i get this [ERROR] No Tdarr snapshots found in state/tdarr-snapshots/.
Chris wrote:
Thanks for trying that, and sorry it dead-ended. Here's the honest picture: that automatic backup only starts protecting Tdarr on updates once your box already has the newer safety feature, so on the update that scrambled things there wasn't a saved copy yet for it to put back. That's on us, not anything you did. The important part: your actual media is completely untouched here, only Tdarr's own settings are involved. I don't want to guess at anything that touches your setup, so since you're a Legend the quickest safe route is Tom AI right in your dashboard, it can look at your box and do the exact repair. I've flagged this straight to Tom as well.
Chris wrote:
I promised you'd hear back here, and I'm sorry it took ten days. Tom did reproduce it, and the cause turned out not to be Tdarr at all: SparkBox's upgrade step carried across the config and data folders but not modules/tdarr/server, where your libraries and flows actually live, so each core upgrade dropped an empty one in its place. That's fixed in v1.6.408 — sudo sparkbox upgrade — which also adds an automatic snapshot restore if the database ever corrupts again. Being straight with you: neither change repairs a database that is already corrupt with no snapshot behind it, so your box still needs a hands-on repair. Tom AI in your dashboard is the safest route for that. — Chris