May 25, 20224 yr So, Over the weekend in Southern Ontario we got hit with some pretty bad winds and my power was out and caused some damage to my unraid server. One of my disks failed and I was able to re-build that disk. However, my appdata seems to have taken some damage as well. I did a restore of the appdata and have been reinstalling my dockers and I am unable to get plex to work. This is the error I am getting in the Logs: Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000 (N4soci10soci_errorE) I followed spaceinvaders "How to fix a Corrupt Plex Database" video as well as this reddit post: https://www.reddit.com/r/PleX/comments/qitj8k/database_errors_seemingly_unrepairable/ when I do an integrity check using "Plex SQLite" "$DB" "PRAGMA integrity_check" I get the response back "ok", so it seems like those solutions are "working" but not fixing my problem. I tried to rollback to an earlier version of the plex db, but had the same problem. I am at a loss as to what I should try next. Any help is appreciated. tower-diagnostics-20220525-1518.zip
May 25, 20224 yr Solution I've had issues restoring from backups with Plex. But for me to get it to work I had to delete multiple files and then only restore the 2 .db files and start plex again. Of course make backups of these files first. Shutdown plex Delete: com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.blobs.db-shm com.plexapp.plugins.library.blobs.db-wal com.plexapp.plugins.library.db com.plexapp.plugins.library.db-shm com.plexapp.plugins.library.db-wal Restore ONLY (copy from backup): com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.db Start plex again. See if that works for you. If the other DB files in that directory are not corrupted you might be able to restore one of the dated ones that are in this folder. Also make sure the date stamps you restore are the same dates. Edited May 25, 20224 yr by jmztaylor
May 25, 20224 yr Author 9 minutes ago, jmztaylor said: I've had issues restoring from backups with Plex. But for me to get it to work I had to delete multiple files and then only restore the 2 .db files and start plex again. Of course make backups of these files first. Shutdown plex Delete: com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.blobs.db-shm com.plexapp.plugins.library.blobs.db-wal com.plexapp.plugins.library.db com.plexapp.plugins.library.db-shm com.plexapp.plugins.library.db-wal Restore ONLY (copy from backup): com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.db Start plex again. See if that works for you. If the other DB files in that directory are not corrupted you might be able to restore one of the dated ones that are in this folder. Also make sure the date stamps you restore are the same dates. Unfortunately, that didn't do anything. Still throws : Starting Plex Media Server. Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000 (N4soci10soci_errorE) Starting Plex Media Server. Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000 (N4soci10soci_errorE) Starting Plex Media Server. Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000 (N4soci10soci_errorE) Starting Plex Media Server. Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000 (N4soci10soci_errorE) [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting. [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 01-envfile: executing... [cont-init.d] 01-envfile: exited 0. [cont-init.d] 01-migrations: executing... [migrations] started [migrations] no migrations found [cont-init.d] 01-migrations: exited 0. [cont-init.d] 02-tamper-check: executing... [cont-init.d] 02-tamper-check: exited 0. [cont-init.d] 10-adduser: executing... usermod: no changes ------------------------------------- _ () | | ___ _ __ | | / __| | | / \ | | \__ \ | | | () | |_| |___/ |_| \__/ Brought to you by linuxserver.io ------------------------------------- To support LSIO projects visit: https://www.linuxserver.io/donate/ ------------------------------------- GID/UID ------------------------------------- User uid: 99 User gid: 100 ------------------------------------- [cont-init.d] 10-adduser: exited 0. [cont-init.d] 40-chown-files: executing... [cont-init.d] 40-chown-files: exited 0. [cont-init.d] 45-plex-claim: executing... [cont-init.d] 45-plex-claim: exited 0. [cont-init.d] 50-gid-video: executing... [cont-init.d] 50-gid-video: exited 0. [cont-init.d] 60-plex-update: executing... Docker is used for versioning skip update check [cont-init.d] 60-plex-update: exited 0. [cont-init.d] 90-custom-folders: executing... [cont-init.d] 90-custom-folders: exited 0. [cont-init.d] 99-custom-scripts: executing... [custom-init] no custom files found exiting... [cont-init.d] 99-custom-scripts: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. Starting Plex Media Server.
May 26, 20224 yr Author I am not sure how, but this issue resolved itself... I did end up resetting my router to fix swag/ombi..., not sure how why that would have mattered for this issue... but it seems resolved...
September 20, 20223 yr On 5/25/2022 at 8:31 PM, jmztaylor said: I've had issues restoring from backups with Plex. But for me to get it to work I had to delete multiple files and then only restore the 2 .db files and start plex again. Of course make backups of these files first. Shutdown plex Delete: com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.blobs.db-shm com.plexapp.plugins.library.blobs.db-wal com.plexapp.plugins.library.db com.plexapp.plugins.library.db-shm com.plexapp.plugins.library.db-wal Restore ONLY (copy from backup): com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.db Start plex again. See if that works for you. If the other DB files in that directory are not corrupted you might be able to restore one of the dated ones that are in this folder. Also make sure the date stamps you restore are the same dates. Thanks, this worked for me.
November 22, 20223 yr On 5/25/2022 at 12:31 PM, jmztaylor said: I've had issues restoring from backups with Plex. But for me to get it to work I had to delete multiple files and then only restore the 2 .db files and start plex again. Of course make backups of these files first. Shutdown plex Delete: com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.blobs.db-shm com.plexapp.plugins.library.blobs.db-wal com.plexapp.plugins.library.db com.plexapp.plugins.library.db-shm com.plexapp.plugins.library.db-wal Restore ONLY (copy from backup): com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.db Start plex again. See if that works for you. If the other DB files in that directory are not corrupted you might be able to restore one of the dated ones that are in this folder. Also make sure the date stamps you restore are the same dates. What's the path for those files?
November 23, 20223 yr On 11/22/2022 at 11:49 AM, rmp5s said: What's the path for those files? Wherever you have appdata going. For example mine is at /mnt/cache/appdata/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases
November 26, 20223 yr On 11/23/2022 at 3:31 PM, jmztaylor said: Wherever you have appdata going. For example mine is at /mnt/cache/appdata/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases Hmm...the only things I have there are the two that are supposed to be copied back from backup... Edited November 26, 20223 yr by rmp5s
November 26, 20223 yr 24 minutes ago, rmp5s said: Hmm...the only things I have there are the two that are supposed to be copied back from backup... Should still work
November 26, 20223 yr 43 minutes ago, jmztaylor said: Should still work Gave it a shot. Still no love. I'm out of ideas. Made a new post here if you'd like to check it out.
February 17, 20233 yr On 11/26/2022 at 5:49 PM, jmztaylor said: Should still work Worked for me! Thanks man!!! I had to replace a corrupted SSD and this worked flawlessly.
March 16, 20233 yr On 5/25/2022 at 9:31 PM, jmztaylor said: I've had issues restoring from backups with Plex. But for me to get it to work I had to delete multiple files and then only restore the 2 .db files and start plex again. Of course make backups of these files first. Shutdown plex Delete: com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.blobs.db-shm com.plexapp.plugins.library.blobs.db-wal com.plexapp.plugins.library.db com.plexapp.plugins.library.db-shm com.plexapp.plugins.library.db-wal Restore ONLY (copy from backup): com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.db Start plex again. See if that works for you. If the other DB files in that directory are not corrupted you might be able to restore one of the dated ones that are in this folder. Also make sure the date stamps you restore are the same dates. 🙏 my Plex went down on the worst possible time, when I have no time to troubleshoot. Following your steps got him running again in literally 5 mins! fasted way: - using cloud commander (app) - rename “databases folder” to something new - create new one - move the 2 backup files, like mentioned. Same time stamp! - rename said files = removing the time stamp - start Plex and with a bit of luck? All is well again!
June 5, 20233 yr On 5/25/2022 at 9:31 PM, jmztaylor said: I've had issues restoring from backups with Plex. But for me to get it to work I had to delete multiple files and then only restore the 2 .db files and start plex again. Of course make backups of these files first. Shutdown plex Delete: com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.blobs.db-shm com.plexapp.plugins.library.blobs.db-wal com.plexapp.plugins.library.db com.plexapp.plugins.library.db-shm com.plexapp.plugins.library.db-wal Restore ONLY (copy from backup): com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.db Start plex again. See if that works for you. If the other DB files in that directory are not corrupted you might be able to restore one of the dated ones that are in this folder. Also make sure the date stamps you restore are the same dates. Thanks, I resolve the problem too.
December 18, 20232 yr On 5/25/2022 at 3:31 PM, jmztaylor said: I've had issues restoring from backups with Plex. But for me to get it to work I had to delete multiple files and then only restore the 2 .db files and start plex again. Of course make backups of these files first. Shutdown plex Delete: com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.blobs.db-shm com.plexapp.plugins.library.blobs.db-wal com.plexapp.plugins.library.db com.plexapp.plugins.library.db-shm com.plexapp.plugins.library.db-wal Restore ONLY (copy from backup): com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.db Start plex again. See if that works for you. If the other DB files in that directory are not corrupted you might be able to restore one of the dated ones that are in this folder. Also make sure the date stamps you restore are the same dates. This also worked for me, thank you!
July 17, 20241 yr On 5/25/2022 at 3:31 PM, jmztaylor said: I've had issues restoring from backups with Plex. But for me to get it to work I had to delete multiple files and then only restore the 2 .db files and start plex again. Of course make backups of these files first. Shutdown plex Delete: com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.blobs.db-shm com.plexapp.plugins.library.blobs.db-wal com.plexapp.plugins.library.db com.plexapp.plugins.library.db-shm com.plexapp.plugins.library.db-wal Restore ONLY (copy from backup): com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.db Start plex again. See if that works for you. If the other DB files in that directory are not corrupted you might be able to restore one of the dated ones that are in this folder. Also make sure the date stamps you restore are the same dates. Thank you!
October 11, 20241 yr My Databases folder has a lot more files than the instructions above mention (the delete and replace instructions that seem to be working for everyone). My files have "dlna" in the name and I have a ton of extra files there epg episode guide files and a music analysis folder. Should I get rid of those as well? Thanks!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.