Moving Plex macOS server to Ubuntu

Hi,

I have just installed a new Ubuntu Desktop machine and mounted al the needed shares for my Plex Libraries. I now want to move all the Plex Server settings, played statuses and metadata from my old macOS server to my Ubuntu.

I am really new to Ubuntu so I am looking for an easy to follow guide. Can anyone help me out here? :slight_smile:

Thanks in advance!!

Patrick

Did you already have a look at the related support article?
https://support.plex.tv/articles/201370363-move-an-install-to-another-system/

To add to Tom’s post,

I have a Backup/Restore tip for Linux.

For you, being on a Mac, instead of starting with /var/lib/plexmediaserver/Library
you will alter the directory names / starting points. Otherwise the process is the same.

  1. You will want to go to ~/Library/Application Support
  2. Next, your tar file will reference ā€œ./Plex Media Serverā€
  3. When you restore it into the new system, you will go to ā€œ/var/lib/plexmediaserver/Library/Application Supportā€
  4. Rename ā€œPlex Media Serverā€ to ā€œPlex Media Server.oldā€
  5. Restore the tar file (tar xf command)
  6. Then continue with the procedure in the How-To for setting ownership and permissions as I’ve detailed.

You will end up with a ā€œ/var/lib/plexmediaserver/Librrary/Application Support/Plex Media Serverā€ (from your Mac) and ā€œ/var/lib/plexmediaserver/Library/Application Support/Plex Media Server.oldā€ (unused and to be deleted after you’re up and running.

Thanks @ChuckPa!! I wil definitely try this tonight or tomorrow! Looks promising :slight_smile:

Trying it out right now, couldn’t wait till tomorrow!

Question: Could I make a scheduled task in Ubuntu performing the backup-task?
I like the idea of having a daily or weekly backup for safety :wink:

@ChuckPa, you, are, the, MAN!!
Your guide worked perfectly without any issues and my library is like it was :ok_hand:t3:

Would you also know a decent way to install Tautulli on Ubuntu and transfer all settings and history from macOS?

Thanks a lot for your help, this makes my day!

I don’t use it but if it maintains any similar directory structures between the OS’s, I would think the same process might apply. Does their documentation show any of that information?

Hi, since the original post about the backup tar.gz is closed, i will ask my question here. Is it possible to make an automated (crontab for example) to have a daily or weekly fresh backup?

@Patrick1610

I do precisely that.

I have a job run, as root,

cd /var/lib/plexmediaserver ; tar cfz /nas/backups/Plex-daily.tar.gz ./Library

Awesome! If i just enter that in terminal, the job will be created and always run?

Also, could it be a command which saves for example the last three backups and then starts removing the old one? So when I screw something up and find out later, I have some time to fix before a new backup has overwritten the old one?

Oh wow, I never thought this would be that easy! Just added your line to an empty file and put that in the crontab. Works like a charm!

Thanks again for pointing me in the right direction :slight_smile:

Hi,

I’m still running into a little problem, hoping you can help me out!

The following script runs fine on the crontab specified time:
cd /var/lib/plexmediaserver ; tar cfz /mnt/Plex/Plex/Backup-Plex-Ubuntu/PlexBackup-daily.tar.gz ./Library

But this script doesn’t work, though it seems identical to me, except for the paths:
cd /opt/Tautulli ; tar cfz /mnt/Plex/Tautulli/Backup-Tautulli-Ubuntu/TautulliBackup-daily.tar.gz ./Library

My sudo crontab looks like this:
45 8 * * * /mnt/Plex/Tautulli/Backup-Tautulli-Ubuntu/backup-script
45 8 * * * /mnt/Plex/Plex/Backup-Plex-Ubuntu/backup-script

Also when I set the crontab lines on different times, the Tautulli database never backups…

Thanks in advance!
Patrick

Patrick, I would find that easier to do as

#!/bin/sh

cd /opt/Tautulli

tar cfz /mnt/Plex/Tautulli/Backup-Tautulli-Ubuntu/TautulliBackup-daily.tar.gz ./Library

There’s no reason to complicate it by use of the semicolons.

Now, with it broken out, Is the error obvious?

Hello. So I have been following a bunch of these forum posts as well as the guide posted on how to move from system to system. Unfortunately after I began. So I wiped out /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/ directory and transferred over my MacOS ~/Library/Application Support/Plex Media Server/. However I seem to be getting stuck with the plist to XML. I ran putil to make it an xml file and transferred it over to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/ . Though when I start the pms service it is not accessible. So I am assuming it has something to do with the preference file. Is it suppose to be prefrences.xml or Prefrences.xml I have seen it referenced both ways? And is there a template xml file somewhere since I have given up on converting the plist file to xml. This way I can copy over the miniumum needed data

I’m not a Mac guy but would hope, in the plist file, you find some keywords with values.

Things like PlexOnlineEmail=ā€œvalueā€, ProcessedMachineID="value"

Of you do, these form your Preferences.xml file.

While I don’t know the exact sequence of conversion, I can help move whatever is possible.

Such a thing is probably best done via PM if you wish.

How would you like to proceed?

Ah yes I see those values. However I don’t have the the orginal Prefrences.xml file. Is there a place where there is a generic Prefrences.xml example file? Now that I know Prefrences.xml is named correctly, I went to go check the log files to see what is going on that I can’t connect to the Web GUI however I am completely missing the ā€˜Logs’ Directory. I can move this to a PM if you think that is best. I just figured since I have seen multiple forum posts I must not be the only one who has struggled with this.

There is no ā€œgenericā€ preferences file other than that which PMS itself writes as you perform the first-run setup. Anything missing will be added. It is always updated when you change preferences as well.

PMS will create the needed directories under Plex Media Server when it starts.
If it doesn’t, we can address that

Ah I figured it out when I looked at the systemctl log. Apparently I forgot to give it ownership of the Application Support Directory. I got everything working. One thing that I was surprised by was that some of the content it showed as it being in the recycle bin, however when I emptyied the trash it didn’t remove them and when I clicked to edit the file, it figured out that the media was actually there and it fixed the preview image to no longer show the trash bin ontop of the cover art.

Excellent :slight_smile:

Did I forget to place that step in my HowTo ?

Nope. It is there, as well, as on https://support.plex.tv/articles/201370363-move-an-install-to-another-system/. I just completely skipped it because I got so caught up on the Prefrences.xml