Export iocage Instance of Plex

Busthead

Dabbler
Joined
Oct 11, 2017
Messages
34
Hello,

Exports my Plex jail appear to include video files (export runs for a long time and file size in iocage/images continues to grow). How can I determine if

iocage export plex

will include or exclude my video files?

Thx
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
What are you expecting to accomplish with the export command?

Are your videos stored in the jail or have you mounted a video dataset?
 

Busthead

Dabbler
Joined
Oct 11, 2017
Messages
34
My expectation (desire) is to export an instance of my Plex jail that is no larger than the 4.51 GB listed as 'Used' under Storage-Pools-Vol1-iocage-jails-plex.

I stopped the export once it reached 6GB.

My movies and TV shows are stored on my Vol1 pool. I don't recall exactly how I setup my Plex jail but my 'movies' and 'tv' folders are accessible from my Plex filesystem at /media/movies and /media/tv
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
OK, so my question was trying to understand why you think an export is a good idea, not the desired size of the export. If you just want a copy of what's in the jail, a snapshot of the jail dataset would possibly do it... although I would also question the value of that if you have the database properly separated out (jails should contain no data and be disposable).

If your plex database (not the media files) is somewhere from 10GB to perhaps as much as 400GB (depends on your library contents and the settings you have under plex regarding thumbnails), your jail will be that size too.

What do you see from iocage df ?
 

Busthead

Dabbler
Joined
Oct 11, 2017
Messages
34
Is there documentation on how to separated out the plex database properly?

root@freenas:~ # iocage df
+------------+-------+------+------+-------+-------+
| NAME | CRT | RES | QTA | USE | AVA |
+============+=======+======+======+=======+=======+
| plex | 1.26x | none | none | 4.54G | 1.61T |
 

hertzsae

Contributor
Joined
Sep 23, 2014
Messages
118
Here are the three lines that I use to mount an external database:
Code:
iocage exec plex "mkdir -p /config"
iocage fstab -a plex /mnt/Vol1/jail_config_data/plexdata /config nullfs rw 0 0
iocage exec plex sysrc plexmediaserver_support_path="/config"

Note that both jail_config_data and plexdata are datasets created in the GUI so that I can easily take snapshots of them.
 

Busthead

Dabbler
Joined
Oct 11, 2017
Messages
34
@hertzsae my Plex server doesn't recognize the "plexmediaserver_support_path" variable:

root@plex:~ # sysrc plexmediaserver_support_path
sysrc: unknown variable 'plexmediaserver_support_path'
 

hertzsae

Contributor
Joined
Sep 23, 2014
Messages
118
Are you running the plugin or did you create the jail? Did you install the normal version or the plexpass version? I think it's plexmediaserver-plexpass_support_path if you installed the package titled plexpass that gives you access to beta releases.
 

Busthead

Dabbler
Joined
Oct 11, 2017
Messages
34
I created a jail and performed the Plex install manually, but don't recall the details. I'm using the free version of Plex.
 

hertzsae

Contributor
Joined
Sep 23, 2014
Messages
118
Looking closer at your error message, it looks like you ran
iocage exec plex sysrc plexmediaserver_support_path
instead of
iocage exec plex sysrc plexmediaserver_support_path="/config"
 

Busthead

Dabbler
Joined
Oct 11, 2017
Messages
34
Rather than attempting to modify my existing (and functional) Plex instance, I've created a new Plex instance using the plugin. Its jail name is plex_2.

I logged into the plex_2 web interface, authenticated with my Plex credentials, and went through the setup but did not add any media folders. I then stopped the plexmediaserver service from the plex_2 shell and executed the following from the freenas shell:

iocage exec plex_2 "mkdir -p /config"
iocage fstab -a plex_2 /mnt/Vol1/Backups/jails/plexdata /config nullfs rw 0 0
iocage exec plex_2 sysrc plexmediaserver_support_path="/config"

I zipped the "Plex Media Server" directory from my existing plex jail.

Should I now:
  1. Delete /Plex\ Media\ Server/ directory from plex_2
  2. Unpack the “Plex Media Server.gz” file to /mnt/Vol1/Backups/jails/plexdata
  3. Restart the plexmediaserver service on plex_2
  4. Mount my media files via the plex_2 web UI
Then any future Plex instances can use /mnt/Vol1/Backups/jails/plexdata?
 

hertzsae

Contributor
Joined
Sep 23, 2014
Messages
118
That sounds about right. The beauty of these jails is you can try stuff and delete it if it doesn't work.
 
Top