Closed vpatel9202 closed 1 year ago
plex-db already does vacuum and re-index which would serve as a decent replacement of the optimize database thing you're talking about here. I am not interested in automating Plex Database recovery though as that can cause data loss that the user would then not be aware of as opposed to when manually running the suggested script where they would have a higher chance of reading the error output.
That's a good point, makes sense. Appreciate it.
Describe the problem Plex database problems are relatively common and kind of a pain in the ass to deal with, requiring manually stopping the docker and then running through the steps laid out by the Plex team. It does usually fix the problem, however.
Describe any solutions you think might work There's a ton of scripts and solutions on Github and elsewhere that work with specific Plex configurations so this is not really a problem that needs to be solved--it only needs to be implemented into the Saltbox project. For example, this repo handles the repair in a fairly robust way.
Additional context I realize one could just use the repo above to do everything I mentioned, but I think there are some benefits to rolling it into the Saltbox project. For one thing, if you have multiple Plex instances, it would be possible to run a database repair on all of them simultaneously.
You may point out that DB repair is not required often enough to implement this feature as well, but there are two other benefits to running the repair more often: