store: Jellyfin DB corruption recovery - full procedure

This commit is contained in:
Cal Corum 2026-02-16 10:24:45 -06:00
parent 4ab33da372
commit 6eef9b0585

View File

@ -0,0 +1,12 @@
---
id: 1e0f4762-6a4b-450f-861f-47a9e7952770
type: solution
title: "Jellyfin DB corruption recovery - full procedure"
tags: [jellyfin, watchstate, sqlite, database, recovery, ubuntu-manticore]
importance: 0.9
confidence: 0.8
created: "2026-02-16T16:24:45.699403+00:00"
updated: "2026-02-16T16:24:45.699403+00:00"
---
Jellyfin DB corruption recovery - SQLite Error 11 'database disk image is malformed'. Root cause: corrupted jellyfin.db on ubuntu-manticore. Recovery steps: 1) Stop watchstate first to prevent blank data sync. 2) Cannot dump/recover - corruption too severe. 3) Must do full config wipe (not just DB delete) due to Jellyfin 10.11.4 migration bug - old config files cause migrations to fail against fresh DB with 'no such table: __EFMigrationsHistory' and 'ObjectDisposedException'. 4) Fresh install + library rescan. 5) Restore watch history from watchstate Feb 13 backups using backend:restore command. Key learnings: watchstate IMPORT_METADATA_ONLY=true means only metadata not play state. Jellyfin export:enabled in watchstate could overwrite good data with blank state after rescan - disable before recovery. watchstate backend:restore needs --assume-yes --execute -i flags. For multi-user restore, add temporary backend entries per user in servers.yaml. Old config preserved at ~/docker/jellyfin/config.bak/ on ubuntu-manticore.