Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker Databases

Featured Replies

I had a massive system crash a week or two ago that caused TONS of database issues in basically all of my Docker containers.  I've since gotten most of them mostly sorted except for two specific problem children...Binhex-Sonarr and Plex.

Binhex-Sonarr:  I've done every database repair, restore, etc thing I can possibly think of and I STILL get "database disk image is malformed" at the top of the page as soon as I go to the UI.

image.png.c06c44984f1d3a1913959edb5b062aa4.png

I've tried everything I can think of...are there any ways to fix the DB other than this and restoring from backup?  Maybe I'm repairing/restoring the wrong "sonarr.db"?  Maybe I have to do something to one of these other things?  Maybe a thing somewhere else?  I don't know.  This is the current directory contents:

image.thumb.png.53bfb58e7f5b9b38b5e4d8c5f1dc3fe5.png

Maybe I'm missing something.  Maybe I'm in the wrong directory altogether.  I don't know.

And...Plex:  Plex refuses to cooperate.  Getting another "disk image is malformed" error...

image.thumb.png.e744e392b1cf0c288156818c61b3ef00.png

The problem with all this isn't that I can't work with SQL...I am relatively familiar with DBs.  The problem is that I don't know where all these DBs are!  Once I figure out where all this junk is, I can try to fix it.  Worst case scenario, I can just delete it and let it rebuild.  If I figure out what's broken with Sonarr for instance, I supposed I can just blow it away and restore from a backup.  I still have all my data and I'm relatively diligent about backing up most stuff and I know I have pretty recent backups out of Sonarr.  (Backing up from within the GUI backs up the DB, right?)  I just gotta be able to get in the thing!

Anyway...any help greatly appreciated.  This has been a real nightmare!!

Thanks.

One thing I have had to do previously, was copy the DB files out and let it rebuild it from scratch.  Then I just moved the data from the old db to the new one it created.  I typically use https://sqlitebrowser.org/

 

I am sure there are better ways to repair it but this seemed like an easy way.

 

And the most important part of plex is the watched state.  I have used this previously

 

https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/

Edited by jmztaylor

  • Author
11 minutes ago, jmztaylor said:

One thing I have had to do previously, was copy the DB files out and let it rebuild it from scratch.  Then I just moved the data from the old db to the new one it created.  I typically use https://sqlitebrowser.org/

 

I am sure there are better ways to repair it but this seemed like an easy way.

 

And the most important part of plex is the watched state.  I have used this previously

 

https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/

 

Nice. I'll check those out! Thanks!

5 hours ago, rmp5s said:

 

Nice. I'll check those out! Thanks!

Have you looked at Spaceinvader One's video on how to fix a corrupt Plex DB? 

 

I have been following through the video which is far more helpful than most content out there!

 

i got to the step for running the SQL Lite command and it tells me the command is not found. When i type ls it shows up as “SQL\ Lite*” and whether i try and run SQL Lite, SQL Lite*, SQL\ Lite* nothing runs. 
 

any suggestions?

(Also trying to get support from Plex forums here:

https://forums.plex.tv/t/plex-media-server-docker-in-unraid-media-libraries-something-went-wrong/814674/2)

Edited by rdawg1234

  • Author
On 11/27/2022 at 2:07 PM, bwnautilus said:

Have you looked at Spaceinvader One's video on how to fix a corrupt Plex DB? 

 

 

Nope! He's the best but I didn't even know that video existed! Will definitely check that out.

 

How would one go about "resetting" other Dockers that have lost their way? I have backups of most of my Dockers so flat out deleting everything wouldn't really be a huge problem. (I don't think...) Is that a thing? Remove container, delete folders? Which folders? This goes back to my previous, "where is all this stuff" post. lol

  • Author
On 11/30/2022 at 7:20 PM, rdawg1234 said:

I have been following through the video which is far more helpful than most content out there!

 

i got to the step for running the SQL Lite command and it tells me the command is not found. When i type ls it shows up as “SQL\ Lite*” and whether i try and run SQL Lite, SQL Lite*, SQL\ Lite* nothing runs. 
 

any suggestions?

(Also trying to get support from Plex forums here:

https://forums.plex.tv/t/plex-media-server-docker-in-unraid-media-libraries-something-went-wrong/814674/2)


Where'd you find the "custom Plex SQLite" program?  I'm at 4:20 in (giggidy) and I don't have any Plex anything in /usr/lib...

image.thumb.png.a44035e4d908bb98cc35c84d1be08e46.png

  • Author

Had to start the container, start a terminal INTO the container, go to /usr/lib and find what the Plex directory is called.  For me, even though the container is called "Plex-Media-Server", the directory is /plexmediaserver...got it!  Now to continue through the vid.  👍

Edited by rmp5s

  • Author

Uuuuuuuuuuuuuuuuuuuuuuuuum...

image.thumb.png.c19e0d7f74641fb7ce438b1037fbbe33.png

 

Why can't anything just WORK!?  What am I missing here???

  • Author

I thought it may be freaking out because of that escape character so I renamed it to plex-sqlite...still nothing.

Thought maybe it didn't have executable permissions...nope.  Sure does.

image.thumb.png.9a7aa2c44aec1d18463583f6702e9e9c.png

I'm at a loss...

  • Author

Running 

 

"/mnt/user/appdata/Plex-Media-Server/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" --sqlite "PRAGMA integrity_check"

 

as described here, I get:  "bash: /mnt/user/appdata/Plex-Media-Server/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db: Permission denied"...maybe it IS a permissions issue?...

  • Author

Thought maybe it was saying the permissions of the DB files are the problem so I ran in and gave them a quick 777, ran it again and got this...

image.thumb.png.7699ab4f23e32526fa8d3600fe4db63d.png

 

So.  Yea.  No idea.  I'm lost.

  • Community Expert
4 hours ago, rmp5s said:

Thought maybe it was saying the permissions of the DB files are the problem so I ran in and gave them a quick 777, ran it again and got this...

image.thumb.png.7699ab4f23e32526fa8d3600fe4db63d.png

 

So.  Yea.  No idea.  I'm lost.

You have your quotes such that you're trying to execute the db file, unlike what the post you linked to shows.

  • Author
42 minutes ago, Kilrah said:

You have your quotes such that you're trying to execute the db file, unlike what the post you linked to shows.

Yea, I tried it both ways...neither worked.

  • Author

Literally the very last comment on desktop is literally the very first comment on mobile because...reasons...I guess.

image.thumb.png.b31837392c5f764607ccdb4e7eeb4d19.png

 

The hero we don't deserve...kind of embarrassed I didn't try that, honestly.  lol  #fail

Back in business!...until the next damn thing doesn't work, anyway...🤣

  • Author

Made it through the rest of the steps in the video without a hitch!!

Now I get this...

image.thumb.png.3464f36af92eb487ad076a3f318ceee0.png

 

I'm done with this.  Can I just wipe it all and start over?  This is insane...

  • Author

Or maybe I'll install a different Plex container...maybe Binhex?  Would that cause problems?  I can't think of any...thoughts?

  • Author

Ended up installing Binhex PlexPass and calling it good.  I tried EVERYTHING I could think of to get the old official container back up and running and NOTHING worked.  Oh well, I guess.

  • 2 months later...

Sorry I disappeared after getting frustrated. In the end I rebuilt my plex media server and recreated the libraries. Annoying but wasnt end of the world. I believe a hard reboot caused the plex server file corruptions. GL all

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.