Server Version#: 1.26.1.5772-872b93b91
Player Version#: 4.80
Since the latest all the my libraries now show this error message.
Saw something in the log file that suggested DB corruption and followed the KB article to repair a corrupt database both automatically and manually but I see the same error.
Running the DB check command returns the message OK but looking at the logs I still see:
ERROR - SQLITE3:0x7e10a099, 11, database corruption at line 81887 of [1b256d97b5]
ERROR - SQLITE3:0x7e10a099, 11, statement aborts at 25: [delete from metadata_relations where metadata_relations.related_metadata_item_id in (select metadata_items.id from metadata_items where metadata_items.guid in (select guid from (select
ERROR - Exception inside transaction (inside=1) (E:\jenkins\server\3578859791\Library\DatabaseMigrations.cpp:237): sqlite3_statement_backend::loadOne: database disk image is malformed
ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed
I recently (although it has been working for over a month) migrated a number of my libraries to PCLOUD (Cloud Storage) although some libraries are still local and both.
This only happened after the recent update to 1.26.1.5772
Thanks Dane I did try the manual method but that hasn’t worked.
I’ve copied the corrupt database to a different folder and am currently recreating my libraries.
Annoyingly my backup folder was the same as my DB folder (not sure if thats right) and when I followed the restore a backed up DB some of the files mentioned were missing… specifically I was expecting to see a library.db-DATE file as well as a blobs.db-DATE file, but only the library.blobs.db-DATE file existed… The restore steps then didn’t make sense as I didn’t have a library.db-DATE file to rename as the recovered DB
Yep, definitely have that set… and I have created a BACKUP folder within DATABASES to create backups and set that in Settings as the backup location.
Thanks for your help… library scanning is going to take a while from the cloud but it is what it is
I recommend you to clear out the input field for the backup location. Thus, resetting it back to the default.
Because: if the folder is for some reason not accessible, the backup fails.
So that is worse than having a backup directly inside the database folder.
cd /Users/HOME/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases
Check
“/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite” com.plexapp.plugins.library.db “PRAGMA integrity_check”
Dump
“/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite” com.plexapp.plugins.library.db “.output dump.sql” “.dump”
Make a backup copy and delete com.plexapp.plugins.library.db
Open the dump.sql file with an editor and look for corruption you’ll see a line like “CORRUPTION ERROR” with a bunch of **** around it. you can delete all the lines you find, change the very bottom from “rollback” to “commit”, and save.
“/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite” com.plexapp.plugins.library.db “.read dump.sql”