First, on your current PMS installation, go to Settings → Library and disable Empty trash automatically after every scan.
On the second PC, install the same version of PMS as your current installation (to avoid any database migrations).
You can then copy over the database files, run the DELETE command, then copy them back.
You will need to copy both db files, com.plexapp.plugins.library.db and com.plexapp.plugins.library.blobs.db. You’re only modifying the first, but Plex needs both to run correctly.
Ok going to give this a shot, hope I can get it to work. One last question. Is it better to perform this task with the 1.32 installation where my library shows up and works as normal, or using the 1.40 revision where my library did not migrate properly?
@L_D Heard back. You’re good to go. Since this is a basic DELETE, then using standard SQLite is OK. If this had been something like an INSERT INTO operation, then the Plex version would be needed.
No luck so far. I have tried multiple times. Still cannot see my library. I do see it says corrupted database in my logs. So maybe I need to fix that as well?
Then stop Plex Media Server and run the file from the c:\ prompt.
Sample run:
c:\Temp>DBRepair-Windows.bat
22:56:15.61 -- ====== Session begins. (Wed 02/21/2024) ======
22:56:15.80 -- Exporting Main DB
22:56:16.16 -- Exporting Blobs DB
22:56:16.21 -- Exporting Complete.
22:56:16.21 -- Creating Main DB
22:56:16.29 -- Verifying Main DB
22:56:16.33 -- Main DB verification check is: ok
22:56:16.34 -- Main DB verification successful.
22:56:16.34 -- Creating Blobs DB
22:56:16.39 -- Verifying Blobs DB
22:56:16.43 -- Blobs DB verification check is: ok
22:56:16.43 -- Blobs DB verification successful.
22:56:16.44 -- Import and verification complete.
22:56:16.44 -- Reindexing Main DB
22:56:16.49 -- Reindexing Blobs DB
22:56:16.53 -- Reindexing complete.
22:56:16.53 -- Moving current DBs to DBTMP and making new databases active
1 file(s) moved.
1 file(s) moved.
1 file(s) moved.
1 file(s) moved.
22:56:16.55 -- Database repair/rebuild/reindex completed.
22:56:16.55 -- ====== Session completed. ======
I have managed to run the DBrepair.bat utility, unfortunately after completing this task on either the server or my windows 11 install, I get the error Corrupt Database Plex media server was unable to open its media database.
I have restored my backup database and tried this countless times now, DBrepair seems to break my database.
Any thoughts? I am feeling rather defeated with this.
No, that is what plex says when i try to open it after the database repair.
However, I just managed to get a half hearted solution I am ok with. I was able to get an old backup I had saved from early last year to load and function on 1.40. I had tried a few backups previously and they had failed as well, but this one works.
So I have some work refreshing my library with 10 months of content or so, but its far better than starting from scratch! Thankyou very much for all of your help, it has been greatly appreciated.
I skipped 1.40.0 and tried 1.40.1 but after the upgrade, PMS is still showing the “something went wrong” error. I tried the suggestion to delete from external_metadat_items but this table has no rows.
My PMS is still not working. Does anybody have any suggestions? Has the Plex DBRepair Utility worked to resolve the DB upgrade issue?
I had to do the exact same thing and I’m now having issues where occasionally when someone watches something plex will grind to a halt becoming unresponsive and the CPU tops out at 100%. Killing PMS and restarting doesnt help, only a restart or a log off and log on will fix the problem until it happens again. It appears that some of the processes that help out PMS start going nuts on the processor causing the lock up