You can run in interactive mode or add the desired options to the command line.
# cd to Plex Data Directory
cd /var/packages/PlexMediaServer/shares/PlexMediaServer
# Download latest version. This overwrites any existing version. Remove "-O DBRepair.sh" to not overwrite.
wget -O DBRepair.sh https://github.com/ChuckPa/PlexDBRepair/releases/latest/download/DBRepair.sh
# Make it executable
chmod a+x DBRepair.sh
# Run it
sudo ./DBRepair.sh stop auto start exit
Thanks for this very detailled process.
My Linux is very limited…
I have the last step left but I have to wait until there is no one connected anymore!
I’m backing up my database for @dbirch during this time.
Plex Media Server needs to be stopped before making a backup of the active database files (the files that end in .db). If Plex is running, the database files are open, and the backup may not be valid.
The -shm & -wal files are temporary files. They normally go away when Plex Media Server is stopped (the info is incorporated into the main database files).
It is OK to backup the files that have a date appended to the name. Those are backups made by Plex Media Server as a scheduled task. They are not in use when Plex is running.