Restoring from backup after Ubuntu upgrade leaves duplicate empty server with original server down

Server Version#:1.29.2.6364-6d72b0cf6
Player Version#:
Had to reformat an ubuntu machine after a botch OS upgrade, and restored plex from a manually taken backup of the /usr/ files and the var/lib/plexmediaserver files

When logging in to any player, I see the previous version showing the correct libraries, but offline, and the new version online, but has not inherited any of the libraries.
Sign-in-sign-out and reboots have no effect
library files are all in identical locations, in external drives unaffected by the reformat (and manually validated)
Is there a way to complete this restore?

This sounds very much like a permissions problem.

  1. USB drives will need their mount point directory permissions set again.
  2. Restoring Plex again (/var/lib/plexmediaserver) will need the full chown -R again

Can you make a tar.gz of the Logs directory and attach it so we can see where it’s hanging up? (make a To-Do list)

I thought so too, but I’ve validated a recursive chown ( chown -R /var/lib/plexmediaserver) a few times.
I’ve re-performed it and rebooted, and the issue persists.
And yes, I replaced the fstab file with a backup and validated the files were reachable
Thanks for the help, log attached!

Plex Media Server Logs_2022-11-02_15-48-06.zip (684.8 KB)

Got it

490917 (of total: 490917).
Nov 02, 2022 15:47:17.225 [0x7f2b3272ab38] DEBUG - Request: [127.0.0.1:41674 (Loopback)] GET /web/js/883-883-f1b1427bce9454e51024-plex-4.87.2.25887-d04a1ad.js (6 live) #61 GZIP Signed-in
Nov 02, 2022 15:47:17.225 [0x7f2b3272ab38] DEBUG - [Req#61] Final path: "/snap/plexmediaserver/331/Resources/Plug-ins-f4cdfea9c/WebClient.bundle/Contents/Resources/js/883-883-f1b1427bce9454e51024-plex-4.87.2.25887-d04a1ad.js"
Nov 02, 2022 15:47:17.225 [0x7f2b32502b38] DEBUG - Request: [127.0.0.1:41684 (Loopback)] GET /web/js/main-179-4311b1e69996afdff1f5-plex-4.87.2.25887-d04a1ad.js (6 live) #62 GZIP Signed-in
Nov 02, 2022 15:47:17.225 [0x7f2b32502b38] DEBUG - [Req#62] Final path: "/snap/plexmediaserver/331/Resources/Plug-ins-f4cdfea9c/WebClient.bundle/Contents/Resources/js/main-179-4311b1e69996afdff1f5-plex-4.87.2.25887-d04a1ad.js"
Nov 02, 2022 15:47:17.227 [0x7f2b3272ab38] DEBUG - Content-Length of /snap/plexmediaserver/331/Resources/Plug-ins-f4cdfea9c/WebClient.bundle/Contents/Resources/js/883-883-f1b1427bce9454e51024-plex-4.87.2.25887-d04a1ad.js is 1747970 (of total: 1747970).
Nov 02, 2022 15:47:17.227 [0x7f2b32502b38] DEBUG - Content-Length of /snap/plexmediaserver/331/Resources/Plug-ins-f4cdfea9

You installed the SNAP from the Ubuntu store.
Snaps dont use /var/lib/plexmediaserver

Also going to recheck your cert.

Nov 02, 2022 15:47:20.117 [0x7f2b34f68b38] DEBUG - Completed: [127.0.0.1:41706] 200 GET /activities (7 live) GZIP 0ms 478 bytes (pipelined: 4)
Nov 02, 2022 15:47:21.176 [0x7f2b34f68b38] WARN - [CERT] TLS connection from [::ffff:192.168.0.24]:35984 came in with unrecognized plex.direct SNI name '192-168-0-24.d8701e3df3344352bccb697759087a10.plex.direct'; using installed plex.direct cert

Lastly, you have two instances of the server named B********.
(one from /var/lib and one from /snap )

How would you like to proceed.

It sounds like the best plan is to uninstall the snap instance and then debug the var/lib installation

The second instance appears to be a sympton of this particular install, so I suppose I’ll need to resolve the double installed instance from var and snap, and then update

I’ll get on this when time allows and update the thread. Thanks!

Since I can see and identify each of them,

If you’d like to remove the snap one,

sudo snap remove plexmediaserver --purge

Let me know which you’ve chosen to remove and I’ll remove it from Plex.tv
-OR-

(you can also see everything using this URL)
https://app.plex.tv/desktop/#!/settings/devices/pms

Thanks!
I was able to remove the snap and reinstall, and re-apply the backup - so no longer creating ghost accounts.
However, Plex now fails to start properly and is, consequently, not working at all
Here’s the new log file
Plex Media Server log.zip (46.5 KB)

@Fry.Bender

Invalid ZIP file (only 45KB — empty).

Plex Media Server.log (694.4 KB)
replacement upload

Thanks for the logs.

There is no visible activity of authentication attempted.

Are you and the server on the same RFC-1918 compliant subnet AND are you opening the server either through 127.0.0.1 or its LAN IP ?

OK, I think I’ve resolved that issue but ran into another - Ubuntu was giving a keyring error that I was able to work around, and now the server is coming up, but is showing its own status as down and isn’t displaying the imported libraries
Thanks again for your help
I believe there’s a startup crash log that wasn’t previously present
Plex Media Server.log (694.4 KB)
Plex Tuner Service.log (4.7 KB)
Startup Crash.log (163 Bytes)

Crash log seemed to indicate issues in the preferences XML, so I re-replaced it from backup and chowned it again, but it appears it’s still crashing at startup, as log files aren’t updating but startup crash.log is refreshing
Not sure how to proceed with the preferences.xml, as I don’t have a way to parse it
Startup Crash.log (163 Bytes)

The snap version of plex seems to be working just fine as a placeholder - is there a way I can simply import my watch history into the new Ubuntu snap store version? That’s the key piece of data I can’t easily recreate, given the amount of content and users I have

This is the official procedure.

https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/

I’ve been working on adding this to my database utility.
I’m at the testing stages now.

That guide was very helpful, though I ran into a roadblock at the end - apparently, with the snap version, the db lives in the snap directory, which look to be near impossible to modify as it always mounts as read only. so, I cannot copy the settings.sql file into the directory or even try to cat the two files with full directory names.
Let me know if you have a workaround for that. If not, here’s the XML file and we can pursue that route instead
Preferences.zip (222 Bytes)

@Fry.Bender

Want to use my DB utility.

I can now READ from one DB and import into the current PMS database.

For you (if I understand correctly), that would mean:

  1. Read from the SNAP database which contains all your watch history
  2. Import it directly into your main (native app) database.

Want to give it a shot ?

At the moment I’m actually trying to do the opposite -
1 Read from saved backup
2 Import directly into SNAP instance

The native instance is the one failing to launch due to preferences.xml
The snap instance is currently running a dummy library just to maintain access, but has none of the history from the database, as I cannot write to the snap directory

If you think your utility can write to snap, I’m down!
If writing to snap is going to continue to be a roadblock, trying to repair the XML may be the more reasonable path forward

Check your PM. Send me the Preferences.xml

I’ll fix it

My utility does not read/write SNAP packages.
I do support docker – which is far more portable and widely used.

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