Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
It started with a simple issue – I couldn’t access my Radarr instance. Even though my config.xml clearly showed AuthenticationMethod>none</AuthenticationMethod>, Radarr kept asking for login credentials that I never set up.
After checking the logs, I discovered the real culprit:
[v5.28.0.10274] code = Corrupt (11), message = System.Data.SQLite.SQLiteException (0x800007EF): database disk image is malformed
database disk image is malformedThe SQLite database that stores all of Radarr’s configuration, movie data, and settings had become corrupted, creating an authentication loop that made Radarr inaccessible.
First, I stopped the Radarr service to prevent further corruption:
docker stop radarrBefore attempting any recovery, I made backups of all database files:
cd /mnt/kubernetes/volume/radarr/data
cp radarr.db radarr.db.corrupted.backup
cp radarr.db-wal radarr.db-wal.backup
cp radarr.db-shm radarr.db-shm.backupUsing SQLite’s built-in recovery tools:
sqlite3 radarr.db ".recover" | sqlite3 radarr_fixed.dbThis command attempts to recover as much data as possible from the corrupted database and write it to a new file. I encountered some constraint errors during recovery, which is normal with corrupted databases:
Error: near line 14651: stepping, UNIQUE constraint failed: Commands.Id (19)Despite these errors, the recovery process created a radarr_fixed.db file with most of my data intact.
I replaced the corrupted database with the recovered version and cleaned up the write-ahead log (WAL) files:
mv radarr.db radarr.db.corrupted.final_backup
mv radarr_fixed.db radarr.db
rm -f radarr.db-wal radarr.db-shmAfter starting Radarr again:
docker start radarrI could finally access my Radarr instance without any authentication prompts!
Once I regained access, I immediately implemented these preventive measures:
VACUUM operations on the database.recover command salvaged most of my data despite significant corruption.sqlite3 radarr.db "PRAGMA integrity_check;"sqlite3 radarr.db ".backup radarr.backup.db"sqlite3 radarr.db "VACUUM;"This experience taught me the importance of regular maintenance and backups for self-hosted applications. Hopefully, this guide helps others facing similar Radarr database issues!