Media Server won't start

Server Version#: v.1.41.5.9522-a96edc606
Player Version#:
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>

Macbook Air M3 8GB RAM
MacOS v. 15.3.2

Server has been running for years. Now it won’t stat. I get the following error:
Error: Unable to set up server: sqlite3_statement_backend::loadRS: database disk image is malformed (N4soci10soci_errorE)

Your database file is damaged.
Before trying to repair, ensure plenty of free space on the volume that accomodates the Plex data folder.
Never let this volume run full.
Never cut the power to this machine with Plex server is still running – particulally while it’s busy.

I started down this rabbit hole but ran into a deadened trying to elevate to root privileges. I never set up a password for this and sudo doesn’t seem to work. Isn’t there a way I can delete the damaged DB and build a new one?

I am no Linux, nor Mac guy, so I cannot advise unfortunately.

Maybe @tom80H can?

The “nuclear option” is certainly available to you, but you will lose any and all modifications you did manually, as well as most playback data.
The better option would be to restore a backup of the DB files first.
https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

There should be no need to elevate privileges on macOS. Just make sure to run the script as a user that has admin permissions on your machine.

It looks like the homepage’s markup is a bit messed up so the examples on how to run it get a bit confusing.

EXAMPLE: Using DBRepair from the command line on MacOS (on the administrator account)

   osascript -e 'quit app "Plex Media Server"'
   cd ~/Downloads
   tar xvf PlexDBRepair-x.y.z.tar.gz
   cd PlexDBRepair-x.y.z

   chmod +x DBRepair.sh
   ./DBRepair.sh

Edit: typo in the example script

The ‘Restore Backup’ method worked and was much easier than trying to repair. I did notice that Plex didn’t make a new backup once everything was up and running. How do I generate one?

The ‘Restore Backup’ method worked and was much easier than trying to repair. I did notice that Plex didn’t make a new backup once everything was up and running. How do I generate one?

If the related scheduled task is enabled in your server settings, Plex will create a database backup every 3 days.

https://support.plex.tv/articles/201553286-scheduled-tasks/

That may indicate that the database is still damaged, just not as bad

I was unable to run DBrepair. It said I didn’t have sufficient privileges. I am the admin on my system. I didn’t have any luck trying to elevate to root. Am I stuck?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.