DBRepair development

I’m trying to finish the build. Can you give me a bit?

I’m literally on the last module.

The “ink will be wet”

Also, If I give the file, can I get fast turnaround of results ?

ALL:

Something came up tonight that must be resolved first.
For most of the tests, it’s flawless… but not ALL the tests.

Of the 56 source files now (Yes, a lot of C code), ONE is being a “little monster”.

It must be fixed first. Everything else is SOLID .

I’ll work on it as fast as possible but it must be right.

Hi @ChuckPa! You’ve dug me out of many a hole in the past. Unfortunately, I’m in another one with a corrupt db. I saw the update to the GitHub repo regarding the issues with the the updated versions of Plex. Coming here to register my interest in the updated repair tool. Many thanks!

I am in need of the new binares as well, however I will just wait patiently :D.

My issue is with upgrading to 1.43.4 and getting the spellfix_metadata_tiles error. Downgrading to 1.43.3 leaves the media server useable so I will stick with this for now.

GL Chuck!

ALL:

The .08 binary expired. This is how it’s written. (14 day window)

Ver .10 was supposed to release 3 days ago but minor setbacks are delaying.

Last night’s sample to a few folks showed me an issue with one module.
Everything else is solid.

I’m working on that now.

Thanks for this info! I just downloaded the .08 [Windows] binary and ran it, but had unfixable DB issues. Does the fact that the binary is expired have any bearing on this?

FWIW, here is my output when trying to repair the DB:

Enter command # -or- command name (4 char min) : repair


--- Processing Main DB ---
Rebuilding Main DB
  Transferring schema.
  Building FTS tables.
  Generating triggers.
  Transferring data records.
  Generating indexes.
  Populating FTS tables.

Checking Main DB after rebuild.

ERROR: Main DB final integrity check failed.

--- Processing Blobs DB ---
Rebuilding Blobs DB
  Transferring schema.
  Building FTS tables.
  Generating triggers.
  Transferring data records.
  Generating indexes.
  Populating FTS tables.

Checking Blobs DB after rebuild.

Blobs DB rebuild and verification complete.
ERROR: Repair failed for one or both databases. Discarding output

@coderCK

If the binary expires, it won’t run. It’s a hard fail.
It won’t ever give you incorrect results.

What you’re seeing in that .08 version is what I fixed in .10

My recommendation TEST ONLY

  1. Make a copy of the DBs (safe backup)

  2. Run .08 with the --force flag. This will bypass the error I think you are seeing .
    (PMS 1.43.4 ??) --please confirm this with me before advancing.

  3. .08 with --force will perform the repair and skip over the integrity check (FALSE POSITIVE FAILURE)

  4. STAY IN DBRepair – don’t exit yet

  5. Start PMS

  6. Test PMS to see if it starts OK and has fixed your issue

  7. If it has, you can safely exit

  8. if not, do a History command and then a Revert (to undo what you just did while the original DB is still present in the temp dir)

Let me know either way

Thanks for replying! I confirm I am running PMS 1.43.4.10903

  1. I made a copy of the entire Databases directory.
  2. I am running PMS 1.43.4.10903, so I ran .08 with the --force flag, e.g. DBRepair.exe --force
  3. No repair was performed automatically when I ran it, and I was presented with the normal menu, so I ran repair. It did the same thing as before.
  4. I stayed in DBRepair as instructed.
  5. I started PMS
  6. I tested it, and it functioned as normal, but didn’t fix the issue I’m having in Plex (though it may be unrelated to DB issues).
  7. Before safely exiting, I ran a check and it still says PMS main database is damaged.
  8. Since PMS still ran as before, I did not do a revert.

Should the forced repair have run automatically when I ran DBRepair.exe --force?

what is the issue you’re having ?

Is it a PMS 1.43.4 issue ?

so it still says damaged but PMS runs ok?

I’m having an issue with Plex where it treats each episode of a particular season of a show as the entire season. For example:

  • Watching one episode of that season makes Plex think I’ve watched every episode of that whole season.
  • Watching 10 minutes of an episode from that season makes Plex show that every episode from that season has had the first 10 minutes watched.
  • Manually marking an episode as Watched marks every episode from that season as watched (and vice/versa with marking as Unwatched).
  • It only affects the second season of a show; it does not affect season 1 of that show, nor has this problem shown up in any other show in my library.
  • Other things of note: Plex initially wouldn’t scan the second season into the library after several attempts (despite the naming convention of the files being correct). I eventually removed it from the library and added it back (read: moved the files to a new location, then ‘deleted’ the show, then moved the files back and rescanned) to get it to show up. Once that finally got the first season and new second season to show up, I discovered the above issue.

I can’t tell if it’s specifically a PMS 1.43.4 issue, but it’s never happened to me before, in several years of using PMS.

What’s your naming structure?
Can you give me a copy-paste example using the CODE ( </> ) above ?

It sounds like you’re not following the structure as PMS expects it

The show is called The Paper. Here’s a snippet of the naming structure, which is what I’ve been using for at least a decade:

NAS Volume/
├─ Video/
│  ├─ movies/
│  ├─ tv/
│  │  ├─ The Paper/
│  │  │  ├─ Season 01/
│  │  │  │  ├─ The.Paper.2025.S01E01.Pilot.mkv
│  │  │  │  ├─ The.Paper.2025.S01E02.The.Five.Ws.mkv
│  │  │  │  ├─ ...
│  │  │  ├─ Season 02/
│  │  │  │  ├─ The.Paper.2025.S02E01.The.Best.of.Us.mkv
│  │  │  │  ├─ The.Paper.2025.S02E02.Weekend.Ned.mkv
│  │  │  │  ├─ ...

Notes:

  • The TV library in Plex is pointed to the tv directory on my NAS.
  • There are actually 10 episodes per season of the show in question, but I limited it to give an example.
  • I’ve truncated the filenames to remove resolution/audio/source info.

@coderCK

This is separate from DBRepair but to share my NAS

[chuck@lizum The Paper (2025).2019]$ ll -R /glock/media/tv5/The\ Paper\ \(2025\)/
/glock/media/tv5/The Paper (2025)/:
total 12
drwxr-xr-x  4 nobody nogroup   52 Sep 14 18:38 ./
drwxr-xr-x 40 nobody nogroup 4096 Sep 14 18:41 ../
drwxr-xr-x  2 nobody nogroup 4096 Sep 14 18:38 Season 01/
drwxr-xr-x  2 nobody nogroup 4096 Sep 14 18:38 Season 02/

/glock/media/tv5/The Paper (2025)/Season 01:
total 44
drwxr-xr-x 2 nobody nogroup 4096 Sep 14 18:38 ./
drwxr-xr-x 4 nobody nogroup   52 Sep 14 18:38 ../
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E01.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E02.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E03.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E04.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E05.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E06.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E07.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E08.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E09.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S01E10.mkv

/glock/media/tv5/The Paper (2025)/Season 02:
total 44
drwxr-xr-x 2 nobody nogroup 4096 Sep 14 18:38 ./
drwxr-xr-x 4 nobody nogroup   52 Sep 14 18:38 ../
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E01.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E02.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E03.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E04.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E05.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E06.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E07.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E08.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E09.mkv
-rw-r--r-- 1 nobody nogroup  280 Sep 14 18:38 The Paper (2025) - S02E10.mkv
[chuck@lizum The Paper (2025).2020]$ 

I have never had any luck with periods between every word.
That’s not plex’s standard

A media renaming tool is likely best help here or to configure your automation to output to Plex standard (all do)

ALL:

I have fixed the one module which I wasn’t happy with.

While there, I’ve finished up a few other things on my mind.

Would anyone care to try in private (as a QA test) ?

Tomorrow it goes for formal QA but my regression tests all passed today (even the new ones)

Thanks for that example @ChuckPa! Thankfully, Plex does officially support periods in the naming conventions:

It does not matter if you use dashes, dots, or just spaces.

Since all my episodes are like that and it would take quite a while to change everything in my library, this is good news for me. In other good news, I did some digging and found that my local .nfo files (despite not using the NFO scraper, which is another issue) had missing information in them which was causing the issue! None of my episodes of The Paper season 2 had their uniqueid XML tag set to any episode number at all, so it seems that Plex considered every episode to be equivalent to the season. Very odd, and something I never had an issue with before, but updating my .nfo files, removing the show, and re-adding it fixed the problem.

BTW, since I didn’t get the DBRepair tool to fix my DB, I’d be interested in doing a QA test for you.

Happy to give it a spin @ChuckPa but you’ve probably already tested against my databases?

@StephenH

Which box you on? Mac Arm?

Yes indeed!

BRACE YOURSELF! :rofl:

Lots happened.

Please check the Release Notes

Let me know if there’s any wonky or misspellings anywhere ?

It should work way better than it did.

hint Try the new orphans command :wink: still needs polishing

Hi ChuckPa,

I tested out the new build. My server is on macOS 27 with an M2 chip. It failed the automatic and repair options. I have no problem that I can tell with my server, just ran this to clean it up so not sure why it is saying my database is corrupted. Here is the output:

2026-09-14 20.21.56 - Session start. Mon Sep 14 20:21:56 2026 (ver 0.1999.10)

2026-09-14 20.21.56 - PMS Version = 1.43.4.10903

2026-09-14 20.21.56 - ============================================================

2026-09-14 20.21.56 - Load - Matched compiled schema for PMS 1.43.4.10903

2026-09-14 20.21.56 - Load - Loaded: Main: compiled:1.43.4.10903

2026-09-14 20.21.56 - Load - Loaded: Blobs: compiled:1.43.4.10903

2026-09-14 20.22.00 - Auto - START

2026-09-14 20.22.00 - CheckDB - Checking basic integrity - /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

2026-09-14 20.22.02 - CheckDB - Checking Indexes and FTS tables - /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

2026-09-14 20.22.03 - CheckDB - FTS functional probe FAIL - fts4_metadata_titles_icu in /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

2026-09-14 20.22.03 - Fragment- Main DB is 0% fragmented

2026-09-14 20.22.03 - CheckDB - Full check complete - /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

2026-09-14 20.22.03 - Auto - Check /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db DB - FAIL

2026-09-14 20.22.03 - CheckDB - Checking basic integrity - /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.blobs.db

2026-09-14 20.22.04 - CheckDB - Checking Indexes and FTS tables - /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.blobs.db

2026-09-14 20.22.04 - Fragment- Blobs DB is 0% fragmented

2026-09-14 20.22.04 - CheckDB - Full check complete - /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.blobs.db

2026-09-14 20.22.04 - Auto - Check Blobs DB - PASS

2026-09-14 20.22.04 - Database- Main: 52 from source, 0 unrecognized, 0 recreated from stored schema.

2026-09-14 20.22.04 - Triggers- Main: 8 from source, 0 unrecognized, 0 recreated from stored schema.

2026-09-14 20.22.08 - Index - Main: 155 from source, 0 unrecognized, 0 recreated from stored schema.

2026-09-14 20.22.11 - TextSrch- FTS repopulation complete for Main

2026-09-14 20.22.11 - CheckDB - Checking basic integrity - /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/dbtmp/com.plexapp.plugins.library-REPAIR-2026-09-14_20-22-00-393.db

2026-09-14 20.22.13 - CheckDB - Checking Indexes and FTS tables - /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/dbtmp/com.plexapp.plugins.library-REPAIR-2026-09-14_20-22-00-393.db

2026-09-14 20.22.13 - CheckDB - FTS functional probe FAIL - fts4_metadata_titles_icu in /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/dbtmp/com.plexapp.plugins.library-REPAIR-2026-09-14_20-22-00-393.db

2026-09-14 20.22.13 - Fragment- Main DB is 0% fragmented

2026-09-14 20.22.13 - CheckDB - Full check complete - /Users/neil/Library/Application Support/Plex Media Server/Plug-in Support/Databases/dbtmp/com.plexapp.plugins.library-REPAIR-2026-09-14_20-22-00-393.db

2026-09-14 20.22.13 - Auto - FAIL - Main DB final integrity check

2026-09-14 20.22.13 - Auto - COMPLETED WITH ERRORS

2026-09-14 20.22.13 - Auto - COMPLETED WITH ERRORS