I also run into this issue basically weekly. I run Plex in a Docker container. Posting my solution here. Good luck all!
1. open the unraid web console
2. wget the zip from this github -- https://github.com/ChuckPa/PlexDBRepair
e.g.
wget https://github.com/ChuckPa/PlexDBRepair/archive/refs/heads/master.zip
3. Use unzip to open the archive downloaded in the previous step. X
e.g.
unzip master.zip
This creates a new directory in the current working directory that will be used in a few steps.
PlexDBRepair-master/
4. Find the plex docker container id. For this, I have my plex docker running.
e.g.
docker ps
This should create a table. What you are looking for is the first field of characters in the plex row. This value is the Container ID.
5. Copy the PlexDBRepair-master directory to the docker container to run them
e.g.
docker cp PlexDBRepair-master/ xxxxxxxxx:/
Where xxxxxxxxx is the Container ID you found above.
5. Access a shell in the docker container
e.g.
docker exec -it xxxxxxxxx bash
Again where xxxxxxxxx is the Container ID from above.
6. In this shell get the necessary script into the root of the container
e.g.
cp PlexDBRepair-master/* .
This is a bit messy, but I'm here for results. This should move what you need into the root of the container for the next step.
7. Execute DBRepair.sh
e.g.
sh DBRepair.sh
This should spawn a bunch of options that you can read over for your own cases.
8. For my cases automatic has been good enough. YMMV.
e.g.
2