Plex Database Corruption

Afternoon, today during lunch I went to watch TV and saw that TV shows were showing Music, and other items were not displayed correctly such as the dashboard not working.

I examined the logs and saw that the database was corrupted. Using this link below, I attempted to repair.

I first installed sqlite3 with apt-get install sqlite3.

https://support.plex.tv/articles/201100678-repair-a-corrupt-database/

Now Plex won’t start at all.

Moved all DB files to an “Old” folder and started plex. It starts normally but as expected, no Libs exist.

What I would like, is to repair my old database as its quite extensive.

Server OS: Ubuntu 18.04

Plex Media Server: PlexPass - latest

Thanks!

No Linux guy here, but if you performed the database repair, the repaired DB file is not owned by plex:plex anymore.
So check the file ownership.

Second thought: sometimes the repair doesn’t succeed.
try restoring one of the DB backups
https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

Oh man… Otto… wow I feel so dumb.

Root is the owner… jesus… how silly of me.

Ill try that now!
TY!

Alright so, plex will now start with the old DB again.

But even after the repair it seems to be having the same issue.

TV Shows is showing 1 album from Music, and the Dashboard is not functional. However everything else seems to be working normally.

Then try the second option.

Looks like the backups are a year old.

-rw-r–r-- 1 plex plex 69632 Nov 1 2017 com.plexapp.dlna.db
-rw-r–r-- 1 plex plex 32768 Nov 1 2017 com.plexapp.dlna.db-shm
-rw-r–r-- 1 plex plex 292552 Nov 1 2017 com.plexapp.dlna.db-wal
-rw-r–r-- 1 plex plex 18052096 Apr 26 18:41 com.plexapp.plugins.library.blobs.db
-rw-r–r-- 1 plex plex 8240128 Feb 27 2018 com.plexapp.plugins.library.blobs.db-2018-02-27
-rw-r–r-- 1 plex plex 8240128 Mar 2 2018 com.plexapp.plugins.library.blobs.db-2018-03-02
-rw-r–r-- 1 plex plex 8240128 Mar 5 2018 com.plexapp.plugins.library.blobs.db-2018-03-05
-rw-r–r-- 1 plex plex 8240128 Mar 8 2018 com.plexapp.plugins.library.blobs.db-2018-03-08
-rw-r–r-- 1 plex plex 32768 May 7 16:38 com.plexapp.plugins.library.blobs.db-shm
-rw-r–r-- 1 plex plex 0 May 7 16:38 com.plexapp.plugins.library.blobs.db-wal
-rw-r–r-- 1 plex plex 263942144 May 7 16:38 com.plexapp.plugins.library.db
-rw-r–r-- 1 plex plex 32768 May 7 16:40 com.plexapp.plugins.library.db-shm
-rw-r–r-- 1 plex plex 20570112 May 7 16:36 com.plexapp.plugins.library.db.Version3
-rw-r–r-- 1 plex plex 1784776 May 7 16:40 com.plexapp.plugins.library.db-wal
-rw-r–r-- 1 root root 248298924 May 7 14:59 dump.sql
drwxr-xr-x 2 root root 4096 May 7 15:12 Old-DB
-rw-r–r-- 1 plex plex 93262848 May 7 16:40 tv.plex.providers.epg.onconnect-bcc9d4f2-ab74-4de0-8646-db8ad43bca87.db
-rw-r–r-- 1 plex plex 32768 May 7 16:40 tv.plex.providers.epg.onconnect-bcc9d4f2-ab74-4de0-8646-db8ad43bca87.db-shm
-rw-r–r-- 1 plex plex 87941904 May 7 16:40 tv.plex.providers.epg.onconnect-bcc9d4f2-ab74-4de0-8646-db8ad43bca87.db-wal

Then I am assuming you did put an invalid/inaccessible path in
Settings - Server - Scheduled Tasks - ‘Show Advanced’ - “Backup directory”

Yes, you are correct. I miss-capitalised 1 folder name.

I found a backup from Jan 2019 and used that.

Plex is in process updating all libraries.

This is better than nothing.

Thanks.

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