# \[Guide\] Migrating Plex Metadata from Unraid to Ubuntu

**URL:** <https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858>\
**Category:** Software\
**Created:** [December 18, 2019, 8:09pm UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858 "2019-12-18T20:09:34Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mthrboard](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/mthrboard/32/3288_2.png) [@Mthrboard](https://forums.serverbuilds.net/u/Mthrboard)\
**Post date:** [December 18, 2019, 8:09pm UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/1 "2019-12-18T20:09:34Z")

</div>

## Summary

So you’ve read JDM’s [QuickSync](https://forums.serverbuilds.net/t/guide-hardware-transcoding-the-jdm-way-quicksync-and-nvenc/1408) guide and you’ve decided to switch from your previous “One Server To Rule Them All” approach to a separate NAS and dedicated QuickSync system. You get to the point in the guide where it tells you to create new libraries, and you ask yourself, “Can’t I just copy my libraries from the old server?” Good news! Yes, you can copy your libraries and metadata from one server to another. Is it worth it? That depends. If you have a library with no custom posters, collections, or manually matched media, or if you’re uncomfortable with a Linux terminal window, you’re honestly better off just following JDM’s [original guide](https://forums.serverbuilds.net/t/guide-hardware-transcoding-the-jdm-way-quicksync-and-nvenc/1408/5) and letting Plex rebuild your library. But if you’re not afraid of the terminal or you need to keep your custom posters, this guide is for you.

I borrowed most of this guide from JDM’s guide, because 95% of what you’re doing is going to be identical. I just updated the formatting slightly, threw in a few screenshots and added my updates where necessary. As you read through these instructions, please read the commands carefully and make sure your syntax is correct before running each command.

## Instructions

> **0. Configure Unraid**
>
> - Enable NFS under `Settings` \> `NFS`
> - Export your media shares. Go to `Shares` and select the share you want to export to linux.
> - Under `NFS Security Settings` change `Export` to `Yes` and `Security` to `Private`.
> - Repeat this step for every media folder you want to share with linux.
> 
> - Go to the `Docker` tab and edit your Plex container settings. Make a note of the host and container paths for your media folder(s) and appdata folder. You will need them later. Here’s a screenshot of my paths for reference:
> 
> ![image](https://serverbuilds-files.b-cdn.net/original/2X/e/e0d731386eb33683ad846a04febda05e9a3669da.png)
> 
> - Close the container settings without changing anything, then stop the Plex container. You can’t have it running when you transfer the data to the new system.

> **1. Install and Configure Ubuntu**
>
> I differ from JDM here, I prefer to use Ubuntu server, where he recommends Ubuntu desktop. My reasoning is once Plex is installed you shouldn’t really need to interact with the system locally outside of an occaisonal update, so why waste resources running a GUI that’s not going to be used? But I will leave that decision up to you and provide links to both installation images.
> 
> Ubuntu Server: [http://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso](http://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso)  
> Ubuntu Desktop: [http://releases.ubuntu.com/20.04/ubuntu-20.04-desktop-amd64.iso](http://releases.ubuntu.com/20.04/ubuntu-20.04-desktop-amd64.iso)
> 
> - Make a bootable install disk using [Rufus](https://rufus.ie/) on a Windows machine, using an [empty flash drive 8GB or larger](https://amzn.to/2KMBeAY?tag=serverforums-20).
> 
> - Boot to the USB drive on your new server and go through the installation process.
> 
> - Most of the remaining steps in this guide are completed in a terminal window. If you installed Ubuntu server, you can either run the commands directly on the machine, or you can use a remote terminal emulator program such as [Putty](https://www.putty.org/). I would recommend grabbing Putty even if you don’t use it now, since it will come in handy for future maintenance on the system. If you installed Ubuntu desktop, there is a built-in terminal emulator.
> 
> - First you will want to download and install any updates that have been released since the installation image was created. In your terminal window, enter the following command all on a single line.  
> `sudo apt update && sudo apt upgrade -y`
> 
> - Once the updates have finished, run the following command to install the NFS utilities that allow you to mount the folders from your unraid box.  
> `sudo apt install -y nfs-common`

> **2. Prepare and Mount Network Share Locations**
>
> - You need to edit the filesystem table file (`/etc/fstab`) to add entries for the NFS shares on your unraid box. The easiest way to do this in the terminal is with the `nano` text editor. Enter the following: `sudo nano /etc/fstab`. Your screen should look something like this:  
> 
> - You can use the arrow keys on your keyboard to navigate in this screen. Go down past all of the lines that are in there currently so you can add your new entries to the bottom of the list.
> 
> - Grab that list of media paths you saved from step 1. For each media path in that list, enter a line like the following:  
> `<server_ip>:<unraid_host_path> /<unraid_container_path> nfs defaults,noatime 0 0`
> 
> - Once you’ve entered your paths, your screen should look something like this:  
> 
> - Next, press `Ctrl+O` (Letter o) and you will see a prompt `File Name to Write: /etc/fstab`. Just hit Enter here to accept the default. Then, press `Ctrl+X` to close the text editor.
> 
> - Now that the paths are added to the filesystem table, you need to create local folders for each media folder you added.
> 
> - Once that’s finished, test mounting one of the folders.

> **3. Install Plex**
>
> - Download and install Plex for Linux [here](https://www.plex.tv/media-server-downloads/).
> 
> - However you downloaded the installer, the next step is installing Plex. Install Plex using one of the following commands:
> 
> - Once Plex has been installed, you need to temporarily stop the Plex server by entering:  
> `sudo systemctl stop plexmediaserver`

> **4. Migrate your Metadata**
>
> - Before you can copy the metadata from your unraid install, you need to remove the existing Plex metadata folder. Run the following command:  
> `sudo rm -rf /var/lib/plexmediaserver/Library` (Note the capital L in Library)
> 
> - Next, copy the metadata folder from your unraid install using rsync, using the following command:

> **5. Reboot and Test**
>
> - At this point, all of the hard work is done. Now you just need to reboot the Plex system to ensure the NFS shares mount and Plex starts automatically after the restart. Enter `sudo reboot` in the terminal and your system will automatically restart. Once it has rebooted, open a browser and go to the Plex web interface,`http://<ubuntu_ip>:32400/web`. Plex may bug you to sign in, and once you’re signed in, you should see your Plex home screen with all of your media intact.
> 
> - Before you test playback, you’ll need to enable hardware transcoding in order to use the QuickSync goodness. Go to `Settings` \> `Transcoder`, and check the `Use hardware acceleration when available` box. It should take effect immediately, Now, test a file from one of your libraries, it should start playing with no issues.

> **6. Post-Install Updates**
>
> Now that Plex is working properly on your new server, you’ll want to update your other programs to point at the new server. Check your config for Tautulli, Sonarr, Radarr, etc., and make sure your router’s port forward is pointing to the new server as well. You can also remove your Plex container and metadata from unraid to free up the space.

Changelog:  
16-Apr-2020 - Updated ISO links to Ubuntu 19.10 since 19.04 is no longer supported. The guide is otherwise unchanged.  
09-May-2020 - Updated ISO links again to Ubuntu 20.04, and updated placeholders to clear up some confusion.  
12-May-2020 - Added some additional tips to the instructions

---

<div class="post-metadata">

**Author:** ![Bren](https://serverbuilds.b-cdn.net/letter_avatar_proxy/v4/letter/b/50afbb/32.png) [@Bren](https://forums.serverbuilds.net/u/Bren)\
**Post date:** [December 23, 2019, 2:20pm UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/2 "2019-12-23T14:20:48Z")

</div>

For anyone else looking for this answer that @Mthrboard has provided in the discord:

The question was how do you give your quick sync plex box WRITE permissions, You have to do this for each IP & NFS share you wish to grant write access to.

Notably, Plex Camera Sync will not work without write permission.

> Mthrboard [US]Today at 1:09 AM
> 
> Unraid exports NFS shares as read only by default.
> 
> Your fstab is most likely fine. In unraid, under the share you want to export, set the NFS security to Private and apply.
> 
> A new box will pop up called Rules. In this box, type the IP of the machine you want to have write access followed by (rw) like so `192.168.1.10(rw)` .
> 
> If other systems need write access you can enter more than one IP set separated by spaces `192.168.1.10(rw) 192.168.1.20(rw)` and so on. If you want other systems to access the share read only append `*(ro)` after the last IP

---

<div class="post-metadata">

**Author:** ![mangocrysis](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/mangocrysis/32/2591_2.png) [@mangocrysis](https://forums.serverbuilds.net/u/mangocrysis)\
**Post date:** [January 6, 2020, 7:09am UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/3 "2020-01-06T07:09:33Z")

</div>

If you have a LAPTOP, make sure you disable the lid-close event. Otherwise every time you close the laptop lid it goes to sleep. I learnt this the hard way. Here’s how to disable it.

[https://askubuntu.com/questions/141866/keep-ubuntu-server-running-on-a-laptop-with-the-lid-closed](https://askubuntu.com/questions/141866/keep-ubuntu-server-running-on-a-laptop-with-the-lid-closed)

```
sudo sh -c 'echo "HandleLidSwitch=ignore" >> /etc/systemd/logind.conf' && sudo reboot

```

---

<div class="post-metadata">

**Author:** ![BENTUNIT](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/bentunit/32/4611_2.png) [@BENTUNIT](https://forums.serverbuilds.net/u/BENTUNIT)\
**Post date:** [April 29, 2020, 7:42pm UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/4 "2020-04-29T19:42:13Z")

</div>

If we move our metadata to the Ubuntu box what’s the best way to backup that folder?

---

<div class="post-metadata">

**Author:** ![CrookedAutobot](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/crookedautobot/32/6232_2.png) [@CrookedAutobot](https://forums.serverbuilds.net/u/CrookedAutobot)\
**Post date:** [May 27, 2020, 10:18am UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/5 "2020-05-27T10:18:33Z")

</div>

This is an awesome guide. I really appreciate it. I migrated a ton of stuff (about 24 GB). I wanted to add a little detail that I experienced.

The binhex-plexpass docker container uses a different file structure. The binhex-plexpass docker container does not use the `/Library` folder. Its file structure is `/<appdata>/binhex-plexpass/Plex Media Server/`.

The standard Ubuntu Plex install file structure is `/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/`.

As a result, I modified the “remove the existing Plex metadata folder” command. I ran this command:  
`sudo rm -rf /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server`

Then on the rsync side I also modified the commands. I ran this command:  
`sudo rsync -azvh root@<unraid_IP>:/<appdata>/binhex-plexpass/ /var/lib/plexmedaiserver/Library/Application\ Support/`

This placed the files in the location the Ubuntu Plex install expected them. After rebooting, I opened up Plex and it looked so sexy! Everything, I was expecting to show up, was there. It worked great!

---

<div class="post-metadata">

**Author:** ![Raize1](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/raize1/32/566_2.png) [@Raize1](https://forums.serverbuilds.net/u/Raize1)\
**Post date:** [May 30, 2020, 3:42am UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/6 "2020-05-30T03:42:29Z")

</div>

Did you have an issue with the GoP-0.xml files? None of them copied, but I cant figure out what they are for.

---

<div class="post-metadata">

**Author:** ![CrookedAutobot](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/crookedautobot/32/6232_2.png) [@CrookedAutobot](https://forums.serverbuilds.net/u/CrookedAutobot)\
**Post date:** [May 30, 2020, 4:29am UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/7 "2020-05-30T04:29:29Z")

</div>

Where are those located for you? I will have to look, I am not sure if I have any. I do not recall having any issues, but I can see if they were not copied.

---

<div class="post-metadata">

**Author:** ![Raize1](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/raize1/32/566_2.png) [@Raize1](https://forums.serverbuilds.net/u/Raize1)\
**Post date:** [May 30, 2020, 6:15am UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/8 "2020-05-30T06:15:36Z")

</div>

Resolved it, I reran it after it finished and it picked up those files. They may have been open at the time or in use, who knows.

---

<div class="post-metadata">

**Author:** ![WexfordStyle](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/wexfordstyle/32/3975_2.png) [@WexfordStyle](https://forums.serverbuilds.net/u/WexfordStyle)\
**Post date:** [October 16, 2020, 10:36pm UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/9 "2020-10-16T22:36:15Z")

</div>

@Mthrboard your guides are epic dude. Keep up the good work! 👐

---

<div class="post-metadata">

**Author:** ![WexfordStyle](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/wexfordstyle/32/3975_2.png) [@WexfordStyle](https://forums.serverbuilds.net/u/WexfordStyle)\
**Post date:** [October 17, 2020, 4:38pm UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/10 "2020-10-17T16:38:28Z")

</div>

I am transferring all my data from an hp290 to an otis that I built into a 1u rack chassis. Only issue I have run into is I get at rsync error. I guess my question is should I care and any ideas how to fix it?

rsync error: some files/attrs were not transferred (see previous errors) (code 2 3) at main.c(1677) [generator=3.1.3]

---

<div class="post-metadata">

**Author:** ![brklynmark](https://serverbuilds.b-cdn.net/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@brklynmark](https://forums.serverbuilds.net/u/brklynmark)\
**Post date:** [May 20, 2021, 10:35pm UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/12 "2021-05-20T22:35:05Z")

</div>

@Mthrboard excellent write-up, thanks so much

---

<div class="post-metadata">

**Author:** ![thePunisherKor](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/thepunisherkor/32/10483_2.png) [@thePunisherKor](https://forums.serverbuilds.net/u/thePunisherKor)\
**Post date:** [August 28, 2023, 4:16pm UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/13 "2023-08-28T16:16:02Z")

</div>

If I used snap to install plexmediaserver for ubuntu 22.04.3 LTS, do I use /var/snap/plexmediaserver/common? Just wanted to confirm, thanks for the write up!!

---

<div class="post-metadata">

**Author:** ![MrAudi\_CA](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/mraudi_ca/32/1456_2.png) [@MrAudi\_CA](https://forums.serverbuilds.net/u/MrAudi_CA)\
**Post date:** [August 16, 2024, 2:51am UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/14 "2024-08-16T02:51:22Z")

</div>

Thank you for this.

How do I modify this script so that I can do a rsync “pull” from my ubuntu machine to unraid’s /mnt/user/backups/plex/?

sudo rsync -azvhn /var/lib/plexmediaserver/Library/Application\ Support/ [root@192.168.0.12](mailto:root@192.168.0.12):/mnt/user/backups/plex/

so the dry run seems to have worked BUT I’d have to manually input the unraid root password. I would like to run this as a scheduled task without user intervention if possible. Can someone kindly guide me to the right place to do this?

---

<div class="post-metadata">

**Author:** ![areyesrn](https://serverbuilds.b-cdn.net/user_avatar/forums.serverbuilds.net/areyesrn/32/706_2.png) [@areyesrn](https://forums.serverbuilds.net/u/areyesrn)\
**Post date:** [June 17, 2025, 11:00am UTC](https://forums.serverbuilds.net/t/guide-migrating-plex-metadata-from-unraid-to-ubuntu/2858/15 "2025-06-17T11:00:31Z")

</div>

just making sure. is Ubuntu 20.04 preferred or any recent LTS release?
