Restoring PMS on re-installed system

I had PMS running on a Ubuntu 18 server.

Because of several issues i decided to reinstall the OS. I backed up /var/lib/plexmediaserver/Library/Application Support/Plex Media Server to my NAS before the reinstall.

Following instructions i FIRST put back this backup and then reinstalled Plex on the system.

However when i now go to localhost:32400/web (through a SSH tunnel) i get promped with setting up a complete new server. The old server is there but it says “unavailabe”.

I did change the permissions to plex:plex and 755 as per instructions i found online. And PMS is now starting without issues.

How can i recover the old server?

Which instructions did you use?

@ChuckPa https://support.plex.tv/articles/201539237-backing-up-plex-media-server-data/

So i backed up the location of the plex data. Put it back before i installed PMS.

Did you make a backup of all of /var/lib/plexmediaserver/Library or only the Preferences.xml file ?

If you only backed up Preferences, your installation is lost.
If you have all of “Library”, we can make it work again as it did before.

@ChuckPa I have everything that was in /var/lib/plexmediaserver/ Library/Application support/Plex Media Server.

I copied that last directory “Plex Media Server” to my NAS. Everything else up to that directory was empty.

Excellent.

The most common thing to happen when reinstalling the OS is the UID & GID of user plex changes.

Easiest first step:

  1. Stop Plex
  2. sudo chown -R plex:plex /var/lib/plexmediaserver
  3. Start Plex
  4. Adjust for maximum smoke output :smiling_imp:

@ChuckPa
I did that already. still when i go to localhost:32400/web old server is unavailable :frowning:

i didn’t remove the server from my account before i reinstalled the OS maybe that’s the issue?

Did the hostname change?

The easiest step to do, if it’s redirecting you to Plex.tv is:

  1. Stop the server
  2. Open **Settings - Authorized Devices - Servers (drop down)
  3. Remove the server
  4. Start the server
  5. Sign out of Plex/web (upper right)
  6. open the loopback (127.0.0.1:32400/web)
  7. It should respond with the web page and then proceed normally through reclaim.

What sometimes happens (especially if cp -r is used), is the server disassociates itself from plex.tv

Removing and reclaiming reinserts the UUID again (which preserves all shared libraries).

If the hostname changed, look for it under both the old & new hostname. Resolve that by finding and deleting the old (if it still appears but it shouldn’t now)

@ChuckPa Thanks!

This works up until the reclaim step. It thinks for a bit and then “there was a problem signing into Plex” i am not even prompted for a password just my e-mail address.

The hostname is the same (did this on purpose for other stuff as well). My /home is on a different partition. So all that was done was reinstalling the OS on /.

Edit: the server does show up under authorised devices again. But i get the error “error signing into Plex” and the server is not actually added to my account.

Problem signing into Plex.

Grab and attach the ZIP logs.
It’s not liking the networking

Zip logs? from where?

I tried something else: purging PMS deleting the entire Library directory. Putting back the backup and reinstalling.

No difference

What’s the LAN IP of both the server and the workstation you’re using?
Is it RFC-1918 compliant (192.168.x.x, 172.16.x.x-172.31.x.x, 10.x.x.x) and are both on the same subnet?

No we’re not actually. I am plugged straight into the router. 192.168.2.x the management IP of the router.

The server is in the 192.168.1.x subnet. Does this matter? They’re both going through the same router so there is routing setup between these subnets

Yep! It certainly does. UDP broadcasts don’t propagate across subnet boundaries.

Easy solution:

  1. SSH tunnel to it ssh -L 8888:127.0.0.1:32400 ip.addr.of.server
  2. Sign in and let sit idle
  3. Open http://127.0.0.1:8888/web in local incognito browser window.
  4. Magic occurs here

That’s exactly what i’ve been doing :slight_smile: different browser and incognito window. No luck it tells me it has found a brand new server and i should give it a new name.

What the F****

HA!

It’s the same hostname it’s always had, right?
If so, the Preferences.xml file got dinged.
A couple ways that happens: Time in the future; copied in ascii mode to a windows system; edited by a Windows editor; fat fingers :wink:

Go through the setup wizard again if the same name,
DO NOT create new sections. they still exist.
Set preferences as you wish along the way.

When you Finish and arrive at the dashboard, it’ll be fully back (unless the backup got damaged somewhere else).

No it’s a different name. This (annabelle) is just the hostname of the host server. The Plex server was named differently.

No Windows systems in my house. So maybe the Synology NAS is guilty?

Anyway sometimes i did get the reclaim option and sometimes i get this. And i don’t fully understand what triggers what outcome

The default friendly name is that of the host.

Is this a VM? or <cringing> a Docker?

Reclaim happens when the Pref file gets invalidated.

The Syno wouldn’t be doing it. I have 2 of the here along with 2 QNAPs and a Thecus. I’ve never run into this when all are on the same subnet (can I poke you here about flattening your lan? :wink: )

No worries i have now connected back on the default wifi LAN. Same subnet as the server.

It’s not a docker and not a VM. It’s a intel NUC running Ubuntu server (headless) 18 LTS

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