I am doing a test migration of Plex from a partition running Ubuntu 18.04 to a partition running 20.04 (with a view to upgrading once testing is complete).
I followed the backup and restore instructions here, however it is not working. Plex is saying the server is not available.
Is anybody able to help me troubleshoot this please?
So everything from the Library folder down is plex:plex.
There is some different ownership in the /var/lib/plexmediaserver folder. I’m not sure what the 998 ownership is and whether that should also be plex:plex. I’m guessing the var folder should remain root:root.
ls -lah /var/lib/plexmediaserver/
total 56K
drwxr-xr-x 13 998 998 4.0K Nov 12 11:04 .
drwxr-xr-x 73 root root 4.0K Nov 12 08:55 ..
drwxr-xr-x 3 998 998 4.0K Oct 23 16:21 Codecs
drwxr-xr-x 17 998 998 4.0K Oct 23 16:21 'Crash Reports'
drwxr-xr-x 2 998 998 4.0K Nov 22 2019 Diagnostics
drwxr-xr-x 3 plex plex 4.0K Nov 12 11:04 Library
drwxr-xr-x 3 998 998 4.0K Nov 1 02:03 Logs
drwxr-xr-x 3 998 998 4.0K Sep 22 2014 Media
drwxr-xr-x 4 998 998 4.0K Sep 23 2014 Metadata
drwxr-xr-x 7 998 998 4.0K Sep 22 2014 'Plug-in Support'
-rw-r--r-- 1 998 998 838 Nov 1 02:58 Preferences.xml
drwxr-xr-x 2 998 998 4.0K Sep 22 2014 Scanners
drwxr-xr-x 3 998 998 4.0K Nov 8 2015 Thumbnails
drwxr-xr-x 3 root root 4.0K Nov 12 10:16 var
it looks like the tar extraction was flattened.
It also looks like UID 998 came from user plex on another system and this system uses another UID for user plex.
sudo chown -R plex:plex /var/lib/plexmediaserver (sudo is required)
the proper structure under “Plex Media Server” is :
That’s odd. I don’t have a Cache folder, but you don’t have a Library folder. The instructions I linked to tar /var/lib/plexmediaserver/Library on the source, delete /var/lib/plexmediaserver/Library in the target and then unzip the tarball in the target’s /var/lib/plexmediaserver/ folder.
My source (working) system has this structure, which is also slightly different from yours -
There is nothing in the folders below /var/lib other than the folders listed in the path above. (ie No files and no other folders until you get to the Plex Media Server folder).
My source system also has some of these folders lower down in the tree -
total 56K
drwxr-xr-x 13 998 998 4.0K Nov 12 11:04 .
drwxr-xr-x 73 root root 4.0K Nov 12 08:55 ..
drwxr-xr-x 3 998 998 4.0K Oct 23 16:21 Codecs
drwxr-xr-x 17 998 998 4.0K Oct 23 16:21 'Crash Reports'
drwxr-xr-x 2 998 998 4.0K Nov 22 2019 Diagnostics
drwxr-xr-x 3 plex plex 4.0K Nov 12 11:04 Library
drwxr-xr-x 3 998 998 4.0K Nov 1 02:03 Logs
drwxr-xr-x 3 998 998 4.0K Sep 22 2014 Media
drwxr-xr-x 4 998 998 4.0K Sep 23 2014 Metadata
drwxr-xr-x 7 998 998 4.0K Sep 22 2014 'Plug-in Support'
-rw-r--r-- 1 998 998 838 Nov 1 02:58 Preferences.xml
drwxr-xr-x 2 998 998 4.0K Sep 22 2014 Scanners
drwxr-xr-x 3 998 998 4.0K Nov 8 2015 Thumbnails
drwxr-xr-x 3 root root 4.0K Nov 12 10:16 var
this clearly shows the tar file was extracted incorrectly and/or in the wrong place. var looks like /var and Library looks like /var/lib/plexmediaserver/Library (or ./Library)
it looks something like what would happen if --one-top-level were used
Thanks. Something has definitely gone wrong - but I’m not sure how that happened. I untarred Library in /var/lib/plexmediaserver. Library looks like it’s in the right place but the other folders aren’t - and agreed re var looking like /var, which is really odd. I didn’t use --one-top-level. I tarred with cfz and extracted with xf.
I am going to uninstall --purge Plex from the test system, and reinstall. I’ll have a look at the folder structure before extracting, and also try look at the structure in the tarball before extracting.