To move your Plex Media Server installation from one Linux instance to another.
For the sake of simplicity, I will refer to the old/original instance of PMS as ‘Server A’ - the new instance with be ‘Server B’ (source/destination style).
1. On Server A, disable “Empty trash automatically after every scan” in Settings → Library
2. Install PMS on Server B. (See the Installation section above)
3. Sign out and stop PMS on Server B (if already signed in):
systemctl stop plexmediaserver.service
systemctl disable plexmediaserver.service
1. Stop PMS on Server A:
systemctl stop plexmediaserver.service
systemctl disable plexmediaserver.service
2. Copy the /var/lib/plexmediaserver
directory on Server A to Server B. I used rsync.
3. Once the plexmediaserver
directory is on Server B and in /var/lib
, make sure the ownership of the directory and its contents are set to plex:plex
.
chown -R plex:plex /var/lib/plexmediaserver
4. Reboot Server B.
This section will be in reference to Server B only.
1. Start PMS:
systemctl start plexmediaserver.service
2. Open the Plex Web App - app.plex.tv. You will likely see your library, though none of the content will actually work.
3. Sign out of the server, then back in. Server → General
4. Navigate to your Libraries (Manage → Libraries). Select ‘Edit Library’ on one of your libraries.
5. Add the new folder where your content for the respective Library is stored. Do NOT delete the old/existing folder location from the previous system, yet.
6. After adding the new content folder, scan the library.
7. Once the scan is complete, remove the old folder location from the previous system.
Repeat steps 4 through 7 for every library you have, one by one.
1. If you originally disabled the ‘Empty trash automatically after every scan’ Library, you can turn that back on
2. Empty Trash for the server.
3. Clean Bundles for the server (wait at least a couple of minutes even after the dialog box goes away before proceeding). Manage → Troubleshooting
4. Optimize Database for the server. Manage → Troubleshooting