Recovering Corrupt Plex Server Database on nVidia Shield

Server Version#: 4.37.1 Android nVidia Shield
Player Version#: all versions / all platforms

I started experiencing errors when viewing my TV library on all of my clients: “There was an unexpected error loading this library”. I could switch to the Library view and see shows, but most of them would not play. The next day, I received a database corruption notification on my phone from the Plex client app. I tried deleting and recreating my TV library, regenerating metadata, optimizing the database, cleaning the bundles, etc., but the error persisted. So I decided to repair/restore the database.
Here are the steps I took to repair my database to a working version.

  1. If you haven’t already, make sure Plex data is moved to a user-accessible location on the Shield
    copy database from Shield to a PC or Mac
  2. If you haven’t already, make sure the Shield Storage is accessible via your network following these instructions.
  3. Stop the Plex Server by going into the Plex client app on the Shield and selecting Settings, Plex Server, Stop server
    3a. Locate a known good backup copy of the database to restore (default location is \internal\Plex Media Server\Database Backups) and copy the backups to the Shield database folder (\Android\data\com.plexapp.mediaserver.smb\Plex Media Server\Plug-in Support\Databases)
    3b. Alternatively, repair the corrupt database: copy the database file from the Shield to a Mac/PC and follow these instructions to check and repair the database file, then copy the database file back to the shield
  4. If the files exist, delete com.plexapp.plugins.library.db-shm and com.plexapp.plugins.library.db-wal
  5. restart the Plex Server on the Shield using the Plex client app Settings screen

I hope this helps others who experience a similar problem!

3 Likes

Thanks so much, worked like a charm!

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