Moving installation - take 2?

Ok, so I attempted to move my installation based on the instructions provided in this thread:
https://forums.plex.tv/discussion/270651/how-to-move-installation.

Unfortunately, they didn’t work. I’m not quite sure why, but after extracting the .tar on the destination system and verifying the permissions were set to plex:plex, the PMS service could not be started. This also occurred after a reboot (which really shouldn’t be necessary on Linux, but that’s beside the point).

I eventually was able to get PMS running and it re-detected all my media, but I lost all the customizations & watched data. Until I can get that working, I don’t want to kill my old PMS yet.

I found a way (https://support.plex.tv/hc/en-us/articles/201154527-Move-Viewstate-Ratings-from-One-Install-to-Another) where I could synchronize the watched data between the source & destination servers - - that worked well.

Is there also some way that I can synchronize the metadata between them without completely uninstalling/reinstalling on the destination system?

I can provide you with Linux support and see you mentioned linux.

What are you moving from and to?

I am moving from Linux to Linux. Both are running Linux Mint - based on Ubuntu.
I’ve set up both systems to have all the media stored under the /mnt directory on both systems, and the PMS is set up under /var/lib/plexmediaserver/Library/Application Support/Plex Media Server on both.

There is a super easy way to do this.

Moving Linux - > Linux, We can take everything under /var/lib/plexmediaserver from the Source system and clone it to the Destination.

I will presume both systems share the same media mounts on /mnt but please adjust paths as needed.

As root on both for all this:

Stop PMS on both

Source

cd /var/lib/plexmediaserver
tar cf /mnt/some/place/common/PlexXfer.tar .

Destination

cd /var/lib/plexmediaserver
mv Library Library.unused
tar xf /mnt/some/place/common/PlexXfer.tar
chown -R plex:plex .

After completing this operation, The source system should have its identity erased to avoid management conflicts in Plex/web

sudo rm "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml"

Now start it (if you intend to use further) and go through setup again without adding libraries as they are already there.

Isn’t that basically the same thing as the instructions from the previous thread where you .tar, copy & extract the PMS directory onto the destination system?
The problem there was that after doing that, the PMS could not be started on the destination system - - at all.
That’s why I was looking for a method of syncing the Metadata - - I don’t see it in the sqlite3 databases, unfortunately, so I’m presuming it’s saved all in the XML bundle files?

I must be missing something important as a Linux - Linux move, where the PMS default directory is still /var/lib/plexmediaserver is a pure tar copy.

  1. The metadata (posters, etc) is stored in the bundles and can easily be recreated
  2. The library sections, media paths, and other key information, is stored in the DB.

With the DB, you can recover and rebuild the bundles but not the reverse.

What are the differences between the two systems??

I am presuming PMS has previously been installed on both as well as no startup custiomization performed. Startup customization is easy to resolve.

The differences are relatively minor, at least as far as Plex should be aware?
The version of Linux Mint is updated on the destination: Source - 17.3, Destination 18.1
Memory: Source - 16GB, Destination 40GB
Size of /mnt: Source - 6TB, Destination 9.7 TB
Processor cores: Source - 8 core, Destination 24 cores
MAC address is of course also changed.

Other than those differences, I’ve tried to make the destination system as close to the the source system as I could. The library names, locations, and actual media are direct clones (via rsync) from the source. In spite of all that, for whatever reason the plexmediaserver service simply would not start on the destination system after placing the data from the source system on it. I’m tempted to just take the main OS drive from the source system and plop it into the destination system… but I’d prefer to keep the updated Linux version if I can?

after you’ve created the tar ball on the old system… (this is where it’s SUPER simple)

  1. Install PMS on the new (let it setup all the user,group and directories with startup stuff)
  2. Let it launch (should be automatic but no harm if it doesn’t.
  3. Copy the previous tarball into /var/lib/plexmediaserver
  4. sudo mv Library Library.old — error ok of not previous existing
  5. sudo tar xf tarball.tar
  6. sudo chown -R plex:plex Library

Literally, that simple. Copy the files, which keeps the permissions, dates/times, and all the DB + metadata. chown makes UID/GID match the new installation.

Start PMS

finish

Hmm - that still appears like the same instructions, just condensed? Nevertheless, I will try it again.
I can’t promise I can get to it right away, though - - at work now. May not actually have time until Saturday, but I’ll see what I can do.

Got it - finally! I think it was the chown command where I was messing up. Previously, I had used the file manager GUI to set the permissions, but since plex:plex was valid on the old server, it didn’t update the UID/GID properly. Using chown fixed it. :smile:

Thank you very much for your help, ChuckPA - both in the previous thread and this one!

I made some minor modifications to the process, and will document them here just for reference:

Prerequisite: Update PMS to make sure the latest & identical version is used for both source & destination servers!

  1. On the source server, sign out of Plex.
  2. Stop the PMS service on source server (sudo service plexmediaserver stop for my particular distro)
  3. Navigate to /var/lib/plexmediaserver as root
  4. Right-click on the Library folder, compress as .tar.gz
  5. Copy to the destination server. When done, shut down source server.
  6. Since PMS was already installed on the destination server, I signed out of it & turned off the service (sudo systemctl stop plexmediaserver for this newer distro)
  7. Copy Library.tar.gz into /var/lib/plexmediaserver
  8. Rename the existing Library folder to Library.old (sudo mv Library Library.old)
  9. Extract the Library.tar.gz with existing structure in-place to create the new Library folder (sudo tar xf Library.tar.gz)
  10. While this was extracting, change port forwarding on my router for port 32400 from source to destination server. (Instructions will depend on your particular ISP & router/gateway)
  11. Set ownership & permissions (sudo chown -R plex:plex Library)
  12. Restart PMS service (sudo systemctl start plexmediaserver)
  13. Fire up a browser, launch & sign in to Plex
  14. Success!

While these are more or less Ubuntu specific, hopefully they will help others encountering a similar problem.

FYI - My old/source server was Mint 17.3 - based on Trusty Tahr. The new is Mint 18.1 - based on Xenial Xerus.