Yet another DB crash

Hi all,

New media is again no longer showing up
As we have (way too) many power cuts over here, I do not have many doubts about the cause

I have summarized the instructions already performed on my PMS a few months ago as follows:

sqlite3 com.plexapp.plugins.library.db “DROP index ‘index_title_sort_naturalsort’”
sqlite3 com.plexapp.plugins.library.db “DELETE from schema_migrations where version=‘20180501000000’”

Integrity check
sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”

Export DB
sqlite3 com.plexapp.plugins.library.db .dump > dump.sql

Rename the original, corrupted DB file
mv com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original

Import the SQL dump back into a new DB file:
sqlite3 com.plexapp.plugins.library.db < dump.sql

Run another check to establish if repair was successful
sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”

Move these 3 files out to a safe place (outside of Plex’s data), just in case you want to revert it:
com.plexapp.plugins.library.db-shm
com.plexapp.plugins.library.db-wal
com.plexapp.plugins.library.db.original

The integrity check reports the following:
[plex@plex Databases]# sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”
Error: no such collation sequence: naturalsort
[plex@plex Databases]#

My questions before starting the recovery:

  1. is it OK to systematically run both
    sqlite3 com.plexapp.plugins.library.db “DROP index ‘index_title_sort_naturalsort’”
    sqlite3 com.plexapp.plugins.library.db “DELETE from schema_migrations where version=‘20180501000000’”

  2. What is the meaning of that version/date 20180501000000 ?

Thanks!

Yes, this will remove the collation naturalsort, which otherwise would cause the error message ’ no such collation sequence: naturalsort

The second instruction will tell Plex server to restore this collation upon next start. By which time you’ll have already performed the repair procedure.

Ever thought about a UPS box? They get cheaper and cheaper.

Hi Otto
Thanks for the answer

And actually, I do have an old UPS, which I only need to put in place and to replace the fuse…
I should definitely put that fuse in my next investment budget…

Thanks again!

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