"Selective" recovery of Plex Media Server

Server Version#: plexmediaserver_1.18.4.2171

Hi,

I am trying to figure what parts of my PMS installation are salvageable after completely jacking it up after changing my plex.tv password. While my media itself is safe, I would really like to recover my library metadata, poster art settings, and subtitles downloaded from from Sub-Zero, etc… I changed my plex.tv password on 2/9 and the resulting devastation of being unable to connect to the local console and apparently losing my played/unplayed information, auto-loaded episode artwork (but not user-modified), and links to a TV episodes season or show no longer function so I have to go to the top of the library to find other episodes. (I am not sure how that breakage happened but I really would like to retain or recover what I can.

I am now faced with the disk filling up because plug-in database backups are larger than the plug-in database itself and I have no idea what this data could be or why the backups went bonkers:

mlitwin@telesthesia:[/var/lib/plexmediaserver/Library/Application\ Support/Plex Media Server/Plug-in Support/Databases]$ls -lh
total 135G
-rw-r--r-- 1 plex 1002  68K Feb 15 07:00 com.plexapp.dlna.db
-rw-r--r-- 1 plex plex  32K Feb 15 07:00 com.plexapp.dlna.db-shm
-rw-r--r-- 1 plex plex 286K Feb 15 07:00 com.plexapp.dlna.db-wal
-rw-r--r-- 1 plex 1002 572K Feb 23 11:30 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 plex plex 572K Feb 11 04:05 com.plexapp.plugins.library.blobs.db-2020-02-11
-rw-r--r-- 1 plex plex 572K Feb 14 04:22 com.plexapp.plugins.library.blobs.db-2020-02-14
-rw-r--r-- 1 plex plex 572K Feb 17 04:49 com.plexapp.plugins.library.blobs.db-2020-02-17
-rw-r--r-- 1 plex plex 572K Feb 20 05:21 com.plexapp.plugins.library.blobs.db-2020-02-20
-rw-r--r-- 1 plex 1002  75G Feb 23 11:30 com.plexapp.plugins.library.db
-rw-r--r-- 1 plex plex  43M Feb  8 04:03 com.plexapp.plugins.library.db-2020-02-08
-rw-r--r-- 1 plex plex 6.2G Feb 11 04:05 com.plexapp.plugins.library.db-2020-02-11
-rw-r--r-- 1 plex plex  21G Feb 14 04:22 com.plexapp.plugins.library.db-2020-02-14
-rw-r--r-- 1 plex plex  33G Feb 17 04:49 com.plexapp.plugins.library.db-2020-02-17
-rw-r--r-- 1 plex plex 6.2M Feb 23 11:30 com.plexapp.plugins.library.db-shm
-rw-r--r-- 1 plex plex 806M Feb 23 11:21 com.plexapp.plugins.library.db-wal

After two weeks of trying to get help and going nowhere, I’ve thrown in the towel. I just want to start over, but I want to try and salvage as much of my metadata as possible. My media is in separate location and is safe, but the backup/restore guides are basically make your installation a tarball so it’s not really helpful when a more surgical approach is necessary.

TL;DR: What I am looking for is some explanation of what information is stored where so I can get a sense for what is trashed and what I can carry over into a new installation. Is there a guide that is a little more detailed about what information is stored where? I have hadn’t have much luck trying to find this.

Specifically, I am trying to find out the following:

  • User elected art that precedes auto-filled Metadata - While auto-loaded metadata from Plex agents seems to be gone or hidden, my manual selections are still there.
  • Metadata agent configuration and precedence
  • Played/Unplayed data- *After changing passwords and having to run a crippled installation, this appears to be lost of after 2/9, but maybe the data prior was written elsewhere?"
  • Subtitle data and settings pulled in by Sub-Zero
  • Why /var/lib/plexmediaserver/Library/Application\ Support/Plex Media Server/Plug-in Support/Databases backups suddenly went bananas.
  • How to start with fresh SSL chain as that is what broke when I dared to change my password.

You want the easy way to recover it?

  1. Delete none of the metadata under Library
  2. Go to Settings - Authorized Devices - Servers (dropdown)
  3. Delete the old server name

With PMS stopped.

  • delete "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml"
  • Start Plex
  • Open the server in the browser (use local IP or loopback (127.0.0.1))
  • It will start a fresh server setup – This is expected.
  • Do everything normally EXCEPT Do not create new library sections
  • Continue through to the dashboard
  • If you’ve not had any damage along the way, your Library sections will be there waiting for you.

Thanks, but like when I did this before I cannot connect to https://localhost:32400 at all and when I connect to http://localhost I log in and it is the same as before: I just see what I see when I go to app.plex.tv. I doesn’t go through the setup process.

Where is the server ? Local or remote from you?

If local, is it on the same subnet ?

Is that subnet RFC-1918 compliant ? (192.168.x.x, 172.16.x.x-172.31.x.x, 10.x.x.x)

The procedure I gave you works therefore there must be something else mitigating?
This is native on the host? It’s not in a VM now?

The server is on the same /24 on a 192.168.x.x subnet.

I actually reinstalled Plex after a full uninstall and I still cannot connect to it even on https://localhost:32400 immediately after a fresh install. The only thing I can do is connect via http which is exactly the same useless information that’s on plex.tv so I don’t even have the means to configure the server, much less add my media libraries. I actually installed plex as a snap in order to make sure there wasn’t some cruft from my previous installation and I still cannot connect via https because the browser is unable to make a secure connection.

I am baffled. It’s hard to believe that I have been offline for over two months now because of this. It all started because I foolishly changed my plex password and after that everything went to hell. Maybe it is something messed up with my account. I seriously am out of ideas.

If you are using exactly https://localhost:32400
then you missed the /web part of the URL.

http://127.0.0.1:32400/web

If we need turn off secure, we can. it will require a manual edit of the Preferences.xml file.

To start:

  1. Sign the Plex/web browser OUT of your account.
  2. Now open an incognito window
  3. In that window , open http://127.0.0.1:32400/web

There’s another way of doing this but requires editing.

  1. Stop the server
  2. Drill into /var/lib/plexmediaserver/Library/Application Support/Plex Media Server
  3. Using the text editor of your preference (Linux one)
  4. As root
  5. Edit it.
    a. Remove PlexOnlineUsername="value"
    b. Remove PlexOnlineToken="value"
    c. Remove your email address.
    d. Before the closing /> put secureConnections="2" (turns off secure requirement)`
  6. Save

Now.

  1. Browser – Make certain it’s signed out of Plex/web (upper right)
  2. Start server
  3. Open NEW browser window
  4. Open http://127.0.0.1:32400/web
  5. It and you are ready to start fresh with authentication
  6. Once back, you can opt to keep insecure or turn on “Preferred”.

Hi @ChuckPa

I had already tried removing all of the PlexOnline* values form Preferences.xml and it didn’t help with the old server.

For the new installation, I ended up installing with snap and it still was not running the setup. However, after restarting my browser I finally was able to start over. I lost all of my metadata in a nas failure as I moved my old install there and the device failed before my nightly backup. It figures!

One thing that was super-weird was that all of my Plex Channels like movies, News, Tidal, are all broken right after installation. I haven’t even touched them. My iOS client doesn’t even show them at all and the “plex” source isn’t even available. I’ve never seen that before and it only started after setting up this new installation. Sound familiar? Since it is a fresh install I figured I might ask before digging into the many threads on similar situations.

Thanks again for your help. I realize that we didn’t get to the heart of the problem since I basically caved in, but now that I know more about how to manage my metadata and keep things backed up hopefully this will be last time I have to start from scratch.

P.S: In the interests of containing my messes, I am rethinking my whole approach to running Plex. After using snap and seeing that it kept itself tidy with service management and avoided all of the extraneous shared user accounts and groups I end up having on my host which really complicates things so I was thinking if having separate dockers for Plex, tautulle, and my VPN Client/Downloader thinger. Perhaps then I can get a little more daring with experimentation with different approaches to automate and do things like making my media read only and have everything including subs stored in metadata. So much is on the Reddit channel so I might as well give it a shot.

Thanks again!

Let me fill in a few blanks.

  1. Plex’s Channels are independent of the server. Those services are available whether you have a server or not.

  2. IMHO, complicated dockers , VPNs, and all that are the problem.

  3. SNAP buys nothing because:
    a. SNAP is a package manger; nothing further.
    b. SNAP packages still use /var/lib/plexmediaserver just as if the native package were used.
    c. SNAP packages deviate from the defacto systemctl / dpkg mechanism already established for Linux.

In closing, IMHO.

K. I. S. S. Keep It Sweet and Simple.

Complexity is nobody’s friend.

I’m not constantly championing running native on the host for my health’s sake.

Mind you I haven’t done any of these things yet, just was thinking of trying to keep things contained, literally. I only used snap as an experiment since nothing else was actually working and it was the only way I got up and running. If it is just a package manager that uses mounts then I guess it shouldn’t matter how it is install, except that it does.

Fair enough on simplicity. I am much in favor of that but after losing my precious metadata twice to reasons unknown I am thinking the current, simply paradigm is not working for me long term and was trying to think of some way to mitigate these Plex house fires.

BTW are podcasts and other Plex channels working for you right now? It seems like there is something serious borked as they keep going on and offline.

If I may suggest further:

  1. Build a simple environment
  2. Craft the backup mechanisms to protect it.

I have a very simple environment here. I took time to craft backup scripts which protect it.

As demonstration of how simple this is, I backed up Fedora, installed ubuntu, added the ubuntu equivalents of all the packages I need for daily work, and was back in full operation within 2 hours. At least 1.75 of those 2 hours was waiting for the files to download and install.

Whatever I have is yours too. It’s not difficult to setup and maintain.

I will layout everything I have setup for Plex and how it all works. I think when you see what I’ve done, you’ll find that you can take it and adapt it to your needs easily.

Wow, that would be fantastic- it’s something that would be valuable for for everyone, not just me!

One of the issues I had was trying to backup Metadata in a way that was restorable. I don’t know why but I am sure looking at your setup would be enlightening.

Want the fastest and most portable Backup & Restore?

To migrate to another server, you add the extra steps of turning off all the automatic updates prior to making the backup.

1 Like

To migrate to another server, you add the extra steps of turning off all the automatic updates prior to making the backup.

That seems… obvious, like something I should have figured out on my own. :stuck_out_tongue:

:rofl: :beer:

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