Hi ! Thank you very much for your continued help. I have a lot of free space, that’s not a problem. To tell you a bit more info, my Plex data is on an SSD drive to be faster. I changed the Plex setting to move it away from my C drive.
The output of DBRepair.bat is this :
H:\Plex Data\Plex Media Server\Plug-in Support\Databases>DBRepair-Windows.bat
NOTE: This script is being replaced with the PowerShell script DBRepair-Windows.ps1,
which aims to better emulate DBRepair.sh (more options, interactive mode, etc).
Consider moving over to the new script.
23:20:47,08 – ====== Session begins. (2025-07-02) ======
23:20:47,40 – Performing DB cleanup tasks
Error: stepping, database disk image is malformed (11)
23:21:55,69 – Exporting Main DB
23:59:20,73 – Exporting Blobs DB
0:04:03,60 – Exporting Complete.
0:04:03,60 – Creating Main DB
2:05:01,60 – Verifying Main DB
2:05:02,61 – Main DB verification check is: ok
2:05:02,61 – Main DB verification successful.
2:05:02,61 – Creating Blobs DB
2:05:43,66 – Verifying Blobs DB
2:05:46,11 – Blobs DB verification check is: ok
2:05:46,17 – Blobs DB verification successful.
2:05:46,17 – Import and verification complete.
2:05:46,17 – Reindexing Main DB
2:05:46,21 – Reindexing Blobs DB
2:05:55,92 – Reindexing complete.
2:05:55,92 – Moving current DBs to DBTMP and making new databases active
1 fichier(s) déplacé(s).
1 fichier(s) déplacé(s).
1 fichier(s) déplacé(s).
1 fichier(s) déplacé(s).
2:05:55,93 – Database repair/rebuild/reindex completed.
2:05:55,93 – ====== Session completed. ======
So it seems to work but it produce a .db file of size 0 at the end.
When I delete this file and rename the original corrupted database, my folder looks like this :
You see that my main database is 40gb. Plex hasn’t backup my database in more than a month because it’s corrupted and I was a little slow to act because my server works fine anyway, for now.
When I executed DBRepair.ps1 it tells a bit more, there is an error when importing, but it doesn’t tell much and it produce also an empty file :
2025-06-29 10.53.54 – Session start: Host is Windows 10 (Build 26100)
2025-06-29 10.54.18 – Auto - START
2025-06-29 11.36.36 – Repair - Export databases - PASS
2025-06-29 12.49.04 – Auto - Failed to import Plex database (importing ‘H:\Plex Data\Plex Media Server\Plug-in Support\Databases\dbtmp\library.sql_2025-06-29_10.54.17’ into ‘H:\Plex Data\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db_2025-06-29_10.54.17’): Process exited with error code 1 (constraint error?), cannot continue.
2025-06-29 12.49.04 – Auto - FAIL
2025-06-29 12.49.15 – Stop - START
2025-06-29 12.49.17 – Auto - START
2025-06-29 13.29.50 – Repair - Export databases - PASS
2025-06-29 16.36.05 – Repair - Import - PASS
2025-06-29 16.36.06 – Repair - Verify main database - PASS
2025-06-29 16.36.09 – Repair - Verify blobs database - PASS
2025-06-29 16.36.10 – Reindexing Main DB
2025-06-29 16.36.10 – Reindexing Blobs DB
2025-06-29 16.36.17 – Reindexing complete.
2025-06-29 16.36.17 – Moving current DBs to DBTMP and making new databases active
2025-06-29 16.36.17 – Auto - PASS
2025-06-29 16.38.06 – Prune - START
2025-06-29 16.38.37 – Prune - Removed 6002 files over 30 days old (308.35 MiB), out of 125461 total files
2025-06-29 16.38.37 – Prune - PASS
2025-06-29 16.38.41 – Ignoring database errors.
2025-06-29 16.38.54 – Start - START
2025-06-29 16.38.55 – Start - PASS
2025-06-29 16.39.08 – Exit - Deleted temp files.
2025-06-29 16.39.08 – Session end. 06/29/2025 16:39:08
The big db-recover.sqlite file is what was created with the official Plex instructions that I talk in my initial post. I kept it in case I find how to reimport it.
Later, I will try the debloat thing you were talking about and I will post my results.
Thanks again !