Can no longer recover database?

I’ve done this many times before, but today, it no longer works. I simply cannot .read the recovered data back in? I’m not a sqlite person, I normally use MS SQL, so I’m just not sure why this isn’t working?
I’ve tried both ‘normal’ mode and ‘administrator’ mode for MSDOS. Makes no difference.
Here is a screen print of the sequence of events:

Have you checked the file “db-recover.sqlite” actually exists (after performing the initial .output command within Plex SQLite)?

Sorry, I did mean to include that, yes, it’s definitely there.

Always perform the DB repair under the same Windows user account, that is also used to run your Plex server.

You might want to use the .bat file from this project: GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases
It is much more convenient and also more thorough.

Also, if the re-import of an SQL file is failing, then there might be a more serious issue with the SQL file.
In which case you can only try to repair an older backup instead. There should be several backups in the Databases folder: https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

Thanks! I was actually unaware of that tool. I ran it. I think that my database is now ok.
However, my blob database is, well, see for yourself:


cut out all the hex

As per the last link above, restore the previous version of the blobs DB file and repeat the repair.

I’m not sure it’s improving? The process looks like it worked.

But then, look at my databases?

Are you sure that you started the script while Plex server was stopped?

I found the problem after tons of trial and error.

The .dump output file exceeds 2GB. That’s why it keeps failing.

All I had to do was split the .dump output file into chunks smaller than 2GB, and now it works fine. I was finally able to get my database recovered. The .read will not work with a file over 2GB.

Why not bring your code up to 64bit standards?

1 Like

Might be related to this: SQLite Forum: 2GB limit on .READ of .SQL created by .DUMP?.

Edit: it looks like that was fixed in 3.45.0, so assuming that is the issue you’re running into, Plex would have to bump their base version to that (or cherry-pick the fix: SQLite: Check-in [56c80a62]).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.