Server Version#: 1.41.8.9834
Hi @ChuckPa - bringing this over from github: Running `check` Command Too Soon After Stop Reports Damaged Database · Issue #144 · ChuckPa/DBRepair · GitHub
As stated there, I was not able to run any DBRepair commands on my corrupted database:
Enter command # -or- command name (4 char min) : 2
Automatic Check,Repair,Index started.
Checking the PMS databases
Check complete. PMS main database is damaged.
Check complete. PMS blobs database is OK.
Exporting current databases using timestamp: 2025-07-07_12.11.32
Exporting Main DB
./DBRepair.sh: line 1027: 771 Killed "$PLEX_SQLITE" $CPPL.db ".output '$TMPDIR/library.plexapp.sql-$TimeStamp'" .dump
Error 137 from Plex SQLite while exporting com.plexapp.plugins.library.db
Could not successfully export the main database to repair it. Please try restoring a backup.
Repair failed. Automatic mode cannot continue. Please repair with individual commands
This included trying to 9 - replace with a plex backup and 8 - import manually from older backups I have offsite in a borg archive.
Here was the script output when trying to 8 - import:
Enter command # -or- command name (4 char min) : 8
Pathname of database containing watch history to import: /tmp1/com.plexapp.plugins.library.db
Checking the PMS databases
Check complete. PMS main database is damaged.
Check complete. PMS blobs database is OK.
Error: PMS databases are damaged. Repair needed. Refusing to import.
My current status is that I got back up and running by manually copying over an old com.plexapp.plugins.library.db and com.plexapp.plugins.library.blobs.db to my Databases directory. This allowed me to run the script and restore a plex backup from a couple of days ago (I suppose I could have just manually renamed the plex backup as well).
Now all DBRepair script options complete successfully.
So I’m good on my end now, but if you see something here worth troubleshooting, I can restore the corrupt database and we can work through it. Let me know. Cheers.