Error: cannot open "db-recover.sqlite"

I’m trying to repair my database but at the last step i’ve got this :

Error: cannot open “db-recover.sqlite”

could you help me here plese ?

Check free space on the volume with the plex data folder.
Make sure that no anti virus software is locking access to the file.

Thanks for your help
I still have 400gb free on this disk
I have no anti virus beside windows defender
Here is how the folder looks:

What’s inside the folders bkp and dbtmp?
One of these is used by the repair script for the exported DB in plain sql.

Inside the bkp there is a copy of db-recover.sqlite

And here what is inside the dbtmp (that is 218gb btw) :


How many times have you used this script before? A lot, it appears.

How large is the .sqlite file in bkp?

Are you actually using the .bat file or are you performing the repair steps by hand?

I used the automated script from Chuckpa once a month I think

Today I wanted to use the repair steps by hand

Why? Does the script not work for you? It is more thorough than the manual procedure as well. If it works, there is no reason to do it another way.

Because I wanted to do a Low-Level Database Recovery

That’s what the script does by default.
There is no lower level recovery – unless you are going to read the .sqlite file and making changes to the SQL statements by hand.

Ok…

Then what should I do now?
Delete the recover.sqlite file and restart PMS?

Depends on whether you have an indication that your database is in fact defective.
If it appears to be defective, restore one of the earlier DB backup copies and repair this instead.

The script returned that it is OK
I’ll restart pms in this state then

Which selection returned that?
The integrity check doesn’t catch all error conditions.

If the script performs the full repair without throwing errors, you are pretty safe to assume that the DB is intact.

Yes, the integrity check
Ok, I’ll restart it now :crossed_fingers:

You can then remove the two folders with all the temporary files from previous repairs.

The bkp and the dbtmp?
It is huge one, won’t I loose data that pms needs to run correctly?

I just need you to confirm before doing it

Both of these are created by the repair script. If the script is done, you can clean up its debris. The script doesn’t remove these folder automatically as a precaution in case of a catastrophic data loss during the repair process, so you have a higher chance of recovering at least some data.

Thank you!

As for why exactly I wanted to do this dB repair it is because I wanted to know if I have an issue with my dB when using the search tool as you can see here :