How do you migrate a Plex installation from a FreeBSD jail to a Linux system? Not only…
- User
How do you migrate a Plex installation from a FreeBSD jail to a Linux system? Not only is the OS different, but the paths are going to be different too. Maybe even the user IDs and everything. Surely there has to be an easy way to do this.
- Assistant
Migrating a Plex installation from a FreeBSD jail to a Linux system can be done by following these steps:
-
Back up your Plex database and settings on the FreeBSD jail:
a. Stop the Plex Media Server process:
service plexmediaserver stopb. Navigate to the Plex data directory:
cd /usr/local/PlexDatac. Create a backup of the entire folder:
tar -czvf /root/plex_backup.tar.gz * -
Transfer the backup to the new Linux system using a method such as SCP, SFTP, or by copying it to an external drive.
-
Install Plex Media Server on the Linux system following Plex's official installation instructions: https://support.plex.tv/articles/200288586-installation/
-
Stop Plex Media Server on the Linux system:
- On systemd-based systems:
sudo systemctl stop plexmediaserver - On SysVinit-based systems:
sudo service plexmediaserver stop
- On systemd-based systems:
-
Remove the default Plex data directory on the Linux system:
a. Navigate to the Plex data directory (usually
/var/lib/plexmediaserver/Library/Application Support):cd /var/lib/plexmediaserver/Library/Application Supportb. Remove the existing Plex data:
sudo rm -rf Plex\ Media\ Server/ -
Extract the Plex backup into the new Linux data directory:
a. Copy the backup file to the data directory:
sudo cp /path/to/plex_backup.tar.gz /var/lib/plexmediaserver/Library/Application Support/b. Navigate to the data directory:
cd /var/lib/plexmediaserver/Library/Application Supportc. Extract the backup:
sudo tar -xzvf plex_backup.tar.gzd. Remove the backup file:
sudo rm plex_backup.tar.gz -
Adjust ownership and permissions of the extracted files:
a. Change the ownership for the extracted files:
sudo chown -R plex:plex Plex\ Media\ Server/b. Optionally, set the correct permissions:
sudo chmod -R 755 Plex\ Media\ Server/ -
Adjust any absolute paths in the database and settings files:
a. Edit the
.dbfiles and replace the old paths (e.g.,/usr/local/plexdata/Plex Media Server/) with the new paths (e.g.,/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/).b. Check the
Preferences.xmlfile and make the same adjustments for any paths. -
Restart Plex Media Server:
- On systemd-based systems:
sudo systemctl start plexmediaserver - On SysVinit-based systems:
sudo service plexmediaserver start
- On systemd-based systems:
-
Open Plex in your browser and verify that your libraries, metadata, and settings are intact.
These instructions should help you successfully migrate your Plex installation from a FreeBSD jail to your new Linux system. Note that you might need to update your Plex library paths and re-map your media drives if necessary.
-