Corrupt Database

Server Version#: 1.21.3.4046-3c1c83ba4
Player Version#: N/A

Good Morning Everyone,

This morning I work to an error message saying the database was corrupt. I have followed other articles and not having much luck. My database is about 700MBs so it is something I have been using for a long time. I have attempted a restore of the Database Directory, and repairing the database with sqlite3. I really want to repair this database because I need the watched / unwatched but most importantly I have all my playlists. Really don’t want to recreated all my Star Wars or Marvel playlist if I don’t need to.

Thanks,
Mike aka Stretch

Thank you for the reply and I thought that would work. Under normal circumstances it would have be I see that I change the default destination to a NAS and upon trying to get that backup I found I had 2 drives that went out in that NAS. :frowning: I do have the original files that were saying they were corrupted. I also restored those files to a couple days ago and having the same problem. I realize I might be SOL now that I found the NAS has gone out but hoping there is another way.

Thank you again,
Mike aka Stretch

What was the outcome of that repair attempt?

I used this article when doing it.

When checking for Corruption or Repair I get the following message.

Error: database disk image is malformed

Hope this helps and Thanks

Did you only do the check or did you start the actual repair process?

I also found an article with MovieFan.Plex posted.

But I get the same error as I do from running repair or checking for corruption.

I tried both Repair and check for Corruption.

At which step of the repair process do you encounter the error?

Try with a slightly modified step 4:

sqlite3 com.plexapp.plugins.library.db .recover > dump.sql

Every step has outside of doing a backup, restore or copy on the files has encountered that error.

When you try the above alternative command line, does it abort immediately with the error message, or do you get a dump.sql file out of it? And if you do, how large is it?

Currently it is running and not erroring. I am going to let it finish and will update the post.

Thanks,

Mike aka Stretch

I could be just impatient and if so just let me know. How long should I keep this running?

Thanks,
Mike aka Stretch

It depends on the size of your database and probably also the extent of the damage.
The speed of your server is of course also important.

On my old Core i7 desktop machine, I can export and re-import a 350 MB database (no damage, though) within very few minutes.

There is no guarantee that th eprocedure will be successful. If the damage is too big, you may end up with lots of duplicate or wrong data in the dump file.

Okay I will give it more time. Running on my Server at home Dual Xeon 2.4GHz 32GB Memory but my Database was pretty big.

Alright so I let it finish and the dump.sql is 183,695KB big. When I try to open Plex I get the following message

Corrupt database
Plex Media Server was unable to open its media database.

The above is only step 4.
Did you execute steps 5 and 6?

I was waiting to make sure I did what you were wanting. I went ahead and ran 5 then 6. I have attached what I get when it runs. It is long and wouldn’t let me put in message.

https://www.reliasystech.com/plex_errors.txt

Thanks

Looks like the damage is greater than what can be automatically repaired.
I have a guy who said he can take a look at the file over the week end.
I will contact you per PM.