2025-03-17, 10:41 PM
I was able to fix my database without having to restore form the backup! Running
on a copy of my current database files revealed that my library.db had errors via the final line "ROLLBACK; -- due to errors"
From https://stackoverflow.com/questions/5274...-malformed I ran the below script on both library.db and jellyfin.db
and resorted them both both to /var/lib/jellyfin/data/ . I also deleted any .bak, db-shm and db-wal file I found for each database. Upon restarting jellyfin all of my data seems to be preserved and "Scan Media Library" and "Extract Chapter Images" tasked completed without errors.
Thank you for all your help TheDreadPirate!
sudo sqlite3 library.db .dump
sudo sqlite3 jellyfin.db .dump
on a copy of my current database files revealed that my library.db had errors via the final line "ROLLBACK; -- due to errors"
From https://stackoverflow.com/questions/5274...-malformed I ran the below script on both library.db and jellyfin.db
#!/bin/bash
cat <( sqlite3 "$1" .dump | grep "^ROLLBACK" -v ) <( echo "COMMIT;" ) | sqlite3 "fix_$1"
and resorted them both both to /var/lib/jellyfin/data/ . I also deleted any .bak, db-shm and db-wal file I found for each database. Upon restarting jellyfin all of my data seems to be preserved and "Scan Media Library" and "Extract Chapter Images" tasked completed without errors.
Thank you for all your help TheDreadPirate!