I should have mentioned that ./Plex\ Media\ Server --sqlite works. I’m not having an actual problem.
I saw Plex SQLite mentioned in another thread, and was nosing around. It looks like a wrapper utility anyway? I figure the “How to Repair a Corrupt Database” documentation will get updated soon.
root@plex:/usr/local/src/PlexMediaServer-1.23.5.4702-efe9a58fb # ./Plex\ SQLite
SQLite version 3.35.5 2021-04-19 18:32:05
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open /tmp/com.plexapp.plugins.library.db
sqlite> PRAGMA integrity_check;
ok
Nice, and thanks much for the assistance with this! We’ll get this fix pushed out in an upcoming PMS release.
Some random extra facts: Plex SQLite is really just a helper stub that re-execs Plex Media Server with the same argv it was passed. The PMS code that checks for the --sqlite argument in argv[1] also checks for Plex SQLite in argv[0]; it’s very busybox-style. So a symlink would’ve worked just as well, but getting all of our installers across all platforms to play nice with symlinks would’ve been way more complex than just writing a tiny stub executable.
Bonus: we can also just make additional unmodified copies of this executable to reuse for any other additional CLI functions we build into PMS! Look out for those in the future