dureal99d
Contributor
- Joined
- Aug 3, 2017
- Messages
- 156
(Discliamer): It is impossible to explain an how too based upon every user specific variable. you will have to make adjustments if you have a version of plex or plexpass installed.
however if you are doing a fresh install this should work to a T of course with your edits based upon your pool and desired jail names, ip addresses where obvious.
Create the Jail:
once in the jail you want update Package repository:
Then:
now switch directory:
Run Command to install ports:
Install these packages:
install plex from port:
To make sure plex starts when you boot the jail:
Start your new jail to create the needed folders and stuff:
Stop plex command or stop the Jail:
IF YOU MUST MIGRATE PLEX TO THE NEW IOCAGE (PRE-11.2 a.k.a. warden):
KEEP IN MIND DEPENDING ON THE SIZE OF YOU DATABASE & HARDWARE IT CAN TAKE A HOUR TO A DAY OR SO TO BACK UP
(note:) You cannot backup your plex data while plex is running.
you must stop plex or the plex jail or your database will be corrupted when restored:
or from the legacy interface sop the jail; the choice is yours.
Switch to directory:
if jail is running and plex stopped
if jail is stopped
run this command while switched into the /usr/local/plexdata-plexpass directory to create a backup archive of your plexdata:
once the backup is complete you have 2 options:
Note:
Once the archive is transferred you need to Restore the backup data:
(Again note:) You cannot restore your plex data while plex is running.
you must stop plex or stop the jail or your database will be corrupted when restored:
To move plexbackup.tar.gz from warden location to iocage location:
WARDEN STORAGE POINT TO IOCAGE MOUNT POINT LOCATION RESTORE:
mount point warden:
so lets say you have all your storage points setup in a warden jail lets view an example:
For iocage mount point conversion:
It would look like this:
Once you have your iocage mount points restored to match what you had in warden jail storage:
Start Plex to verify all is well and works as it should:
Navigate to your jail:
http://youriocagejailip:32400/web/index.html#
CLEAN UP AND REMOVE WARDEN JAIL:
Remove Plex only after verifying that the new restore works:
Assuming all went well remove the warden jail in the legacy interface
And if all is well wala toast it up!!!!!!
TO UPDATE PLEX USING PORTS:
Switch to directory:
Run Command to update ports:
uninstall current plex:
(This can be done while your plex server is still running with no down time)
Then run this command to install the newest version of plex:
AND YOUR GOLDEN:
however if you are doing a fresh install this should work to a T of course with your edits based upon your pool and desired jail names, ip addresses where obvious.
Create the Jail:
iocage create -n "jail name" -r 11.2-RELEASE ip4_addr="vnet0|jail ip/24" defaultrouter="router ip" vnet="on" allow_raw_sockets="1" boot="on"
once in the jail you want update Package repository:
ee /etc/pkg/FreeBSD.conf
Then:
pkg update && pkg upgrade
now switch directory:
cd /var/db/portsnap
Run Command to install ports:
portsnap fetch extract
Install these packages:
pkg install nano wget sudo
install plex from port:
cd /usr/ports/multimedia/plexmediaserver-plexpass/ && make install clean
To make sure plex starts when you boot the jail:
sysrc plexmediaserver_plexpass_enable=YES
Start your new jail to create the needed folders and stuff:
service plexmediaserver-plexpass start
Stop plex command or stop the Jail:
service plexmediaserver-plexpass stop
IF YOU MUST MIGRATE PLEX TO THE NEW IOCAGE (PRE-11.2 a.k.a. warden):
KEEP IN MIND DEPENDING ON THE SIZE OF YOU DATABASE & HARDWARE IT CAN TAKE A HOUR TO A DAY OR SO TO BACK UP
(note:) You cannot backup your plex data while plex is running.
you must stop plex or the plex jail or your database will be corrupted when restored:
while in the jailservice plexmediaserver stop
or from the legacy interface sop the jail; the choice is yours.
Switch to directory:
if jail is running and plex stopped
cd /usr/local/plexdata-plexpass
if jail is stopped
/mnt/yourdrivepoolname/jails/name of plex jail/usr/local/plexdata-plexpass
run this command while switched into the /usr/local/plexdata-plexpass directory to create a backup archive of your plexdata:
tar -czvf plexbackup.tar.gz Plex\ Media\ Server
once the backup is complete you have 2 options:
Note:
Move the file to a place you can find it and move it to the iocage plexdata later:Cool thing is if you need to use your warden plex server at this stage you can as now you will be working in the iocage side of things
Or (preferred) you can leave the archive where it was created and move it to the iocage jail using this commandmv plexbackup.tar.gz /were/you/choose
mv plexbackup.tar.gz /mnt/iocage/jails/yourjailname/root/usr/local/plexdata-plexpass
Once the archive is transferred you need to Restore the backup data:
(Again note:) You cannot restore your plex data while plex is running.
you must stop plex or stop the jail or your database will be corrupted when restored:
To move plexbackup.tar.gz from warden location to iocage location:
once the transfer is complete; switch into iocage jail directory:mv /plexbackup.tar.gz /mnt/iocage/jails/yourjailname/root/usr/local/plexdata-plexpass
to restore you plex database execute command:cd /mnt/iocage/jails/yourjailname/root/usr/local/plexdata-plexpass
tar -xzvf plexbackup.tar.gz
WARDEN STORAGE POINT TO IOCAGE MOUNT POINT LOCATION RESTORE:
mount point warden:
so lets say you have all your storage points setup in a warden jail lets view an example:
/mnt/mydrivepool/mydataset /mediax
For iocage mount point conversion:
It would look like this:
iocage fstab -a yourjailname "/mnt/mydrivepool/mydataset /mediax nullfs rw 0 0"
Once you have your iocage mount points restored to match what you had in warden jail storage:
Start Plex to verify all is well and works as it should:
service plexmediaserver_plexpass start
Navigate to your jail:
http://youriocagejailip:32400/web/index.html#
CLEAN UP AND REMOVE WARDEN JAIL:
Remove Plex only after verifying that the new restore works:
pkg remove plexmediaserver
sysrc -x plexmediaserver_enable
Assuming all went well remove the warden jail in the legacy interface
And if all is well wala toast it up!!!!!!
TO UPDATE PLEX USING PORTS:
Switch to directory:
cd /var/db/portsnap
Run Command to update ports:
portsnap fetch update
uninstall current plex:
(This can be done while your plex server is still running with no down time)
cd /usr/ports/multimedia/plexmediaserver-plexpass/ && make deinstall clean
Then run this command to install the newest version of plex:
cd /usr/ports/multimedia/plexmediaserver-plexpass/ && make install clean
AND YOUR GOLDEN:
Last edited: