Plex database corrupted - how to fix?

hi at all,

plex does not open after a system crash anymore due to corrupted database.

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

I have a backup copy of that specific file “com.plexapp.plugins.library.db”.
can I simply replace it? (see attachment).

best wishes!

@OttoKerner I need your help! :slight_smile:

UPDATE: Replacing was not enough, still corrupted. I noticed the database got 4 MB smaller when trying to open plex, so it was modified immediately when starting plex. so it got corrupted trying to open plex. what can I do now?

Those files with the date in their file names are backup copies as well.
You can drop them into the place of the damaged file.
Make sure to perform the “manual rebuild” procedure on these backups before starting PMS.

And before you do anything at all, check the available free space on drive K:

1 Like

for the rebuild procedure I need Plex SQLite tool, right? never done this before.

Follow the link above.

will do. if nothing works, I could simply delete the plex folder and extract my manual backup from last month? (I zip everything to a file once a month).

If you made the copy while Plex server was still running, the database file will be damaged as well.

no, I made an offline backup. plex shut down before.
Is a repaired database as reliable as an older copy that was never broken? I would rather just restore from my old backup, but I don’t know which folders/files are necessary.

Ideally, you restore the whole plex data folder.
However, if the backup is not too old, you can get away with just restoring the database files: https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

so I first try

  1. repair
    if that does not work you suggest
  2. restoring from a scheduled backup

and if everything fails I can still grab my ZIP-backup, right?

Correct.

1 Like

took the second approach first since it was easier and it worked just fine.

so plex database is really only those two essential files:

" com.plexapp.plugins.library.db and com.plexapp.plugins.library.blobs.db ." ???

No, it’s not that simple.

Perform the repair procedure on those restored files. Otherwise you may be again in the same situation soon.

1 Like

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