PMS on Nvidia Shield- damaged database repair

I recently had Plex lock up during a playback and had to pull the power plug on the Shield. Unfortunately, this left me with a broken database. From there, I went online to try to find the process to restore my database from the backups on the Shield. Perhaps I didn’t look in the right places, but the threads I found here and on reddit gave no indication on how I could do a restore on the Shield. Undaunted, I used what little info I could find to locate the backups and the originals. And somehow, I was able to get things working after a few stops and starts. My question: why were there no simple directions posted somewhere for this?

Original Plex databases were found in my usb external drive:
/storage/drivename/android/data/com.plexapp.mediaserver.smb/Plex Media Server/Plug-in Support/Databases

Backups were found in the Shield’s Internal Shared Storage:
/sdcard/Plex Media Server/Database backups

I first tried the “Optimize Database” solution which had no effect.

What I ended up doing was:

  1. Stopping the Plex Media Server
  2. Removing all files from the original database folder. Yes, ALL files.
  3. Then copying over the latest backup file “com.plexapp.plugins.library.db-yyyy-mm-dd” and renaming the file to match the original, removing the file date from the extension.
  4. On the initial restart of the server I didn’t get back all of the home screen items such as continue watching/on deck etc. So I signed out via the Plex settings on the Shield and signed back in.
  5. Amazingly, that worked!
6 Likes

wow. I have tried this several times and it never worked for me. the official guides on this only mention windows/mac/linux. glad to know it does work. what version of PMS are you using?
Im also interested to see if databases can be repaired on the Shield the way they can on pc/mac

My PMS version is 1.14.1.5488. I found the same thing in the official guide…nothing on the Shield version at all, really. I didn’t try any of the command line stuff so I can’t help you there. The db backup that I used was 2 days old. I’ve suffered much worse data loses in the past so I can’t complain with the outcome. :joy:

Sad to say after finding I couldn’t get my database to update, I had to give up and start over with a clean installation.

2 Likes

Hey, can I ask how you started again with a Clean installation on the Shield? Is there a way to ‘factory reset Plex’ without factory resetting the whole Shield?

Go into the “apps” section in the Shield settings and find the Plex server item. Delete the cache and the data. I also uninstalled updates so had to wait a bit after reinstalling the server to make sure I had the latest version.

1 Like

Hey bruce, could you tell me where you find the original database? in the path you indicate ( /storage/ drivename /android/data/com.plexapp.mediaserver.smb/Plex Media Server/Plug-in), I don’t have the folders and files you’re talking about…

I don’t have any external storage. I have a Shield Pro. Everything is stored on the 500GB internal disk.

Thanks :wink:

Not sure since I don’t have the Pro and I store my library on an external hard drive.

This procedure worked out great for my situation (Shield Pro 2015). I had previously moved the PMS settings location to Internal User Accessible. I believe this, like the OP’s to external, let me access the backed up database files and successfully complete this procedure.

My PMS went south when it upgraded to the initial v1.15 update. Everything disappeared and it acted like it was a fresh clean install. I think it did retain my user login, but worthless overall. The following day another v1.15 update was pushed which I updated to. No luck. I noticed at some point between these two that the setting had changed for storing the database. It was back to system internal, not user accessible. I changed it to internal user accessible but got no improvement. This is likely why my PMS went dumb. I walked away for a few days until today, and found this guide.

I followed the OP’s steps, 1, 2, and 3. However, for step 3, I also copied over a second file, “com.plexapp.plugins.library.blobs.db-2019-05-11” in my case. This was in addition to the single file laid out in step 3 which was “com.plexapp.plugins.library.db-2019-05-11”

After copying both of those files and renaming them by removing the hyphen and date after db (-2019-05-11) I continued with step 4. I went into the Plex app on the Shield, Settings, then turned on the server. Like the OP, the Plex home screen was empty of content. I went back to the app settings and signed out. Then after signing the server back in using the four digit code and https://plex.tv/link brought me back what mostly looked like a restored server.

Thumbnails were mostly blank and missing but they seem to be regenerating. Logging into the Plex desktop web interface showed activity, “Activity: Refreshing guide data for DVR” which took maybe 30 minutes downloading. All DVR recording settings appear good on first glance.

Also, Settings were missing, like remote access disabled, manual port setting gone, upload speed gone, server update channel was back to public, etc. I had to manually go through settings and restore what I remembered.

Very happy. Thanks OP!

@Da_Green
My Shield Pro paths were these. The backup location (again, PMS set to save to Internal User Accessible) (internal storage)/plex media server/database backups That is where my *library.db-yyyy-mm-dd and *library.blobls.db-yyyy-mm-dd files were.

I copied those two files to (internal storage)/android/data/com.plexapp.mediaserver.smb/plex media server/plug-in support/databases That was the location the OP directs to delete all file from before copying the backup database file in.

I see your screenshot does not have /plug-in support/. My PMS had a couple 1.14.x updates in the days prior to my initial v1.15. Maybe there was a difference in what version you were on/came from versus mine? I nearly check for and update apps daily. Hope some of this helps and you get/got it figured out.

Edited for adding info, clarity.

Thumbnails that did not show had to have their metadata refreshed, like my entire Movies library.

1 Like

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