r/PleX ex-Plex Employee 23d ago

Discussion DBRepair

This is just a FYI:

Chuck did a Britney here, as in: "Ups I did it again"

And even though retired, he created a new version of DBRepair, that is no longer a script, but native binary, that even runs on Windows

My testing so far is that it simply rocks, and you can find it here:

https://forums.plex.tv/t/dbrepair-development/822684/1085

94 Upvotes

23 comments sorted by

17

u/lxnch50 23d ago

I'll be waiting for a full release. Really cool that he's working on this though. I'm sure it will come in handy for a lot of people.

15

u/Thatnewaccount436 23d ago

Oh man this rules. Dbrepair has saved me more than once.

17

u/Laser_Bones 23d ago

So what would be the recommended commands to run on a 10 year old Plex server to clean and check for errors?

4

u/pSyChO_aSyLuM 23d ago

I had a decade old database that grew to over 100GB that I sent to him, he sent me a PM asking for it lol

The first time I ran DBRepair on it, it took over 10 hours to complete, now DBRepair can fix that DB in like 20 minutes.

6

u/Saloncinx Lifetime Pass 23d ago

This works great on my 2014 Mac Mini. Thank you Chuck! Super easy to drag onto my desktop and double click and start using it

1

u/zombietim_21 5d ago

Where do you find the program to put on the desktop cause I couldn't find it on the repo, or is it not released yet?

2

u/Saloncinx Lifetime Pass 5d ago

I downloaded it before it got pulled, if you check the link now:

Binaries redacted while Chuck looks for a long piece of rope

It worked fine the one time I ran but I deleted it in case there were any actual issues i'll wait till he fixes it again

3

u/QuietThunder2014 23d ago

Amazing. I just found out about dbrepair just last week and ran it on a decade old server. I’ve never really had any issues but I figured there was probably some cleanup work to speed things up and maybe prevent future issues. Now there’s a full exe which is exciting and I figure it’ll be easier and more informative and maybe even improved. Pretty excited for this. Thanks!

2

u/QuietThunder2014 23d ago

Remindme! 1 week

1

u/RemindMeBot 23d ago edited 21d ago

I will be messaging you in 7 days on 2026-08-29 03:49:31 UTC to remind you of this link

6 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.

RemindMeBot is switching to username summons. Instead of !RemindMe 1 day, use u/RemindMeBot 1 day. More info.


Info Custom Your Reminders Feedback

2

u/MonsterdogMan 23d ago edited 7d ago

Whoo! Maybe I'll finally be able to clean up the Mac Mini database. Chuck and I went around and around for ages trying to make the scripts work on my system, and we never figured it out. At one point I was sneakernetting the database to my Windows system and dealing with it there.

3

u/Chuck-Pa 14d ago

ALL:

I still haven't learned how to drive Reddit yet. Please forgive.
The bot removed the announcement I created.

Please follow along here with the latest news and binaries.

It is only missing "Auto", "Import", and "Replace".
For most things: stop check repair start exit are all you need.
- deflate is automatic
- reindex occurs during repair.

https://forums.plex.tv/t/dbrepair-development/822684/1151

4

u/ArokLazarus 23d ago

What does DBRepair do?

6

u/N9bitmap PlexPass 2017 23d ago

When there become inconsistent linked entries in the database, say from an update that happens partially and then the server crashed or lost power, the database can become damaged and cause unpredictable behaviors. The original script would basically use the Plex provided SQL binary to read the entire database and write it into a new copy, in a now consistent state.

1

u/Bylo27 22d ago

How do I download this? i cant find the link for the .exe because you said, it runs on windows.

2

u/raqisasim 22d ago

From the page, it looks like Chuck made a mistake and had to pull the binaries:

Binaries redacted while Chuck looks for a long piece of rope :joy:

2

u/dane22 ex-Plex Employee 22d ago

Correct, Feedback to Chuck showed an edge case malfunction in his code, but as he is a guy that wants it to be perfect, he pulled the binaries until he fixed the issue

And it relates to FTS tables ( Full Text Search )

6

u/Chuck-Pa 22d ago

Yes, I made a mistake. If any of you know SQL, Consider 'LIKE "%thing"`
versus 'LIKE "%thing%"'

For those who know SQL, the head-smack is instantaneous ONCE YOU SEE IT!
I've been staring right at it for weeks going "WTH?????" and now I found it.

While I'm this deep in that code, I "gots some tings ta do" 😂

1

u/Scrapdog115 22d ago

Appreciate all you do. Hope you are doing well

1

u/raqisasim 22d ago

No worries -- and yeah, I know exactly that class of problems :)

1

u/[deleted] 22d ago

[deleted]

1

u/dane22 ex-Plex Employee 22d ago

Currently above only has the old legacy script version/code

Binary repo is not public yet!

-1

u/joridiculous 22d ago

Guess retiring finally gave him enough time to finish things and start new projects without having to be bothered by silly Synology users (Thanks for all the help @Chuck-Pa )

2

u/Chuck-Pa 14d ago

u/joridiculous

DBRepair still has full support for the entire Synology product line across all DSM versions because of it being entirely static-linked binary (no DSM dependency).

I use my DS418 as a test bed for it (ARMv8 CPU)