Plex Database Corruption unRaid Server

I’m running Version 1.32.4.7195 Plex server on unRaid. I recently moved large number of movies from my windows machine to to the unraid server. Since then, the last 2 database backups came back as corrupted. Not sure how about resolving this issue.

Unraid is known to cause database corruption. See GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases for a way to try to fix the database.

2 Likes

Yeah, i use this tool too :slight_smile:

oh god! How the heck I pull this into unraid? Like I said still new at this unraid thing. Thanks

Can you get command line access?

Are you talking ssh or terminal? Yes on both

You should then be able to use wget and download the zip, extract it, stop plex and run the repair commands

I might need a little more guidance. I have it download.

image

not sure that worked like it was supposed to:

mkdir plexrepair
cd plexrepair
wget https://raw.githubusercontent.com/ChuckPa/PlexDBRepair/master/DBRepair.sh
chmod +x DBRepair.sh
./DBRepair.sh

Then Options
#1
#2
#7

So far so good. I’m getting this Are you trying to run the tool from outside the container environment ?

Can this folder be anywhere, or just in the plex-media-server folder

Anywhere, it creates logs/backups and its useful to keep it all in one place, which is why I created the folder which is not required.

I appreciate the help. This is the full error

Are you using docker containers on unraid?

Yes, the Plexinc docker, plexinc/pms-docker
image

The you need to get SSH/terminal inside the docker container.

Does the repair file need to be in that docker then?

Yes it does

That is the appdata folder correct.
Could it a be grammatical thing. Plexinc vs plexinc?

@ChuckPa can you lend a hand?

You need to log into the docker container too, not just the unraid host

This needs to be run from INSIDE the container at the container’s command line.

When you’re outside, the script has no idea where to look for things.

Please reference: GitHub - ChuckPa/DBRepair: Database repair utility for Plex Media Server databases

EXAMPLE: Using DBRepair inside containers (manual start/stop included)

(Select containers allow stopping/starting PMS from the menu. See menu for details)

    sudo docker exec -it plex /bin/bash

    # extract from downloaded version file name then cd into directory
    tar xf PlexDBRepair-1.0.0.tar.gz
    cd PlexDBRepair-1.0.0
    chmod +x DBRepair.sh
    ./DBRepair.sh
1 Like