Server Version#: 1.25.2.5319 linuxserver Docker Container UnRaid
Player Version#: 4.72.0
I have noticed after the past little while I have quite a few random libraries appearing in my Plex Server, they do not affect anything and cannot be opened or deleted. I believe it is corruption but am also not sure as the rest of my actual libraries are working as expected
Yes I have tried the repair and it passes without fail which isn’t helpful. After some trial and error I have managed to find myself a solution for this while also saving my watch history
Huge thanks to this article & hawks on that forum for supplying the Unix commands for MacOS
Steps:
Due to my server running on UnRaid/ a Docker container and not MacOS I had to use the follwing commands to move the database’s around
Shutdown the Docker container and make a backup of all the database files
Install Plex Media Server for MacOS and perform the initial setup. Shutdown the Plex Server on MacOS and delete the database files it created
Copy the database files to your MacOS machine from the docker container and put them in the datebase directory required for PMS on MacOS
Run this command from the database folder echo ".dump metadata_item_settings" | sqlite3 com.plexapp.plugins.library.db | grep -v TABLE | grep -v INDEX > settings.sql
This exports only the watch history (no collections, libraries or settings) into a settings.sql file
Keep the settings.sql file in the PMS MacOS folder and delete the database files
Start PMS on MacOS and do the initial configuration. Name your Server the same as it was with the previous configuration and create the libraries pointing to the folder path it has on the Docker container
It will not find any files as the path is invalid on MacOS but shutdown PMS on MacOS
Now is time to import the watch history to our new database file. Below is the command to execute from the terminal from the database folder cat settings.sql | sqlite3 com.plexapp.plugins.library.db
The watch history is added to our new database and is ready to be used back in the Docker container
Copy the database file from MacOS and put it back into the Docker containers database directory and start the Docker container. As media is detected and added you will see it remembers your users watch history
Hopefully this helps others in a similar situation, Cheers