New Plugin Available: Plex Media Server!

Status
Not open for further replies.

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
After a number of positive posts, thought I'd try upgrading through the UI and it worked without any issues. Took about 30-45 minutes, but all good!
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
Hi All,

I just installed the Plex Media Server plugin yesterday, and it worked like a charm. I'm also concerned about easy upgrading. I haven't added my media collection yet. Should I just kill the plugin and set up a jail manually and install it that way? Is that more recommended? It seems there is no easy way to currently upgrade PBIs...
 

panz

Guru
Joined
May 24, 2013
Messages
556
Hi All,

I just installed the Plex Media Server plugin yesterday, and it worked like a charm. I'm also concerned about easy upgrading. I haven't added my media collection yet. Should I just kill the plugin and set up a jail manually and install it that way? Is that more recommended? It seems there is no easy way to currently upgrade PBIs...

If you backup the Plex Media Folder you can restore it if you need. With snapshots + Replication is so easy...
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
If you backup the Plex Media Folder you can restore it if you need. With snapshots + Replication is so easy...

Can you expand on that a bit? Or maybe just send a link? I know where the plex user data is stored, and I was planning on rsync'ing that periodically to a plex backup dataset on my primary ZFS pool. How would you do it w/ replication / snapshots that make it super simple? To be clear, we're talking about the metadata here, not the raw data, correct? Thanks in advance - I'm new to FreeNAS, but I'm doing my best to learn quickly!
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
Yup that makes a lot of sense!
 

Magnus33

Patron
Joined
May 5, 2013
Messages
429
So it appears plex update does work although depending on the size of your database it can take a long time.
The most recent freenas update has certainly improved this since it took 5-6 hours for me rather then over 12.

Also there been no real issues with the update unlike the last time when it failed over a short period of time.

But just in-case as already mentioned snapshot snapshot snapshot is a must to cover the butt :)
 

GaiusBaltar

Explorer
Joined
Jan 15, 2014
Messages
61
So it appears plex update does work although depending on the size of your database it can take a long time.
The most recent freenas update has certainly improved this since it took 5-6 hours for me rather then over 12.

Also there been no real issues with the update unlike the last time when it failed over a short period of time.

But just in-case as already mentioned snapshot snapshot snapshot is a must to cover the butt :)

i've got a question regarding plex snapshots: if I create a snapshot of the plex jail, will all my mounted media be shapshot as well at /media in the jail?
if im already snapshotting, say "/mnt/tank/multimediafiles" and that dir is what's mounted inside plex at /media, then i'd have 2 snapshots of the same data, which could make for some interesting recovery scenarios.
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
i've got a question regarding plex snapshots: if I create a snapshot of the plex jail, will all my mounted media be shapshot as well at /media in the jail?
if im already snapshotting, say "/mnt/tank/multimediafiles" and that dir is what's mounted inside plex at /media, then i'd have 2 snapshots of the same data, which could make for some interesting recovery scenarios.

+1 - I have this same question!
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234

The info is fantastic. Would love to know the reason why it wouldn't be snapshotted if it's mounted on the FS... How does ZFS know the dif? Thanks!
 

panz

Guru
Joined
May 24, 2013
Messages
556
Jails use nullfs. It is a sort of "link" to existing inodes.
 

benamira

Explorer
Joined
Oct 12, 2011
Messages
61
All of the Plex database data can be found in:
/mnt/[ZFS_pool_name]/jails/plexmediaserver_1/usr/pbi/plexmediaserver-amd64/plexdata.
There is a subdir named "Plex Media Server" that holds all the metadata, etc that you'd want to back up (it can be quite big depending on your collection. mine's currently 6.7GB). there are a few folders in there (like "cache", "plugin support") that you don't need, but don't hurt to have.

something like this should work for you as cron job:
Code:
#!/bin/sh
#takes a compressed backup of the plexdata directory via having tar run the dir through bzip2 algorithm
tar -cjf /[Path_to_save_plexbackup]/plexdataBKUP.tar.bz2 /mnt/[ZFS_pool_name]/jails/plexmediaserver_1/usr/pbi/plexmediaserver-amd64/plexdata


when you need to restore the database (say after deleting the plex plugin and installing a fresh one), this should work:
Code:
tar -xjf /[Path_to_save_plexbackup]/plexdataBKUP.tar.bz2 /mnt/[ZFS_pool_name]/jails/plexmediaserver_1/usr/pbi/plexmediaserver-amd64/plexdata



:(
I'm in trouble...

I have had an issue with the Plex plugin and i have deleted it, and installed a fresh one.
After that i have stopped plexmediaserver.
And tried to restore "plexdata" dir, previously backed up with this method.

but when trying it after a while i get:

tar: /mnt/MEDIA/jails/plexmediaserver_1/usr/pbi/plexmediaserver-amd64/plexdata: Not found in archive
tar: Error exit delayed from previous errors.

So i can not find a way to restore all my PlexData.

Any suggestions??

 

benamira

Explorer
Joined
Oct 12, 2011
Messages
61
Well i have managed to solve the restore process, but find a new problem, no way to access the Server.

Reinstalled plugin from scratch. Everything ok so far. New installation. I can access the server. :)

If i go in the jail shell and type sockstat -4l:
I can see Plex Media Server listening to 32400 and a large list of other items.

Then i stop the plexmediaserver service.
Restore "plexdata/Plex Media Server" with the backup copy.

And restart plexmediaserver service.

Well, here i find the problem, no more access to the server. :(

If i check again with sockstat -4l now there is no Plex Media Server listening to 32400, and the list is just a few of them. So after copying the backup something goes wrong, and next time Plex starts, can not launch or listen to the port.

It seems Plex Media Server is running but no more access to the server.

Really frustrated, i think i am close to the solution, but no way... Please any help would be more than great!!!


[EDIT]

I finally got it worked deleting Preferences.xml file, inside Plex Media Server folder.
It seems something in the file was blocking PMS from properly starting.
Onece deleted, it works, tested with the plugin and with a JAIL test i have build.

I have had to manually adjust some of the parameters through Plex Web and that's all....
Bufff....
o_O
 

vasil

Cadet
Joined
Apr 23, 2014
Messages
1
Hello.
Sorry for my bad English.

I want to ask,Can be installed PLEX of 32 bit ?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
No the Plex server only comes in 64bit version.
 

mstinaff

Dabbler
Joined
Jan 21, 2014
Messages
34
Some people mentioned they would be interested in a more robust update script. Well I recently got back from traveling and I have this to share

https://github.com/mstinaff/PMS_Updater

I started with the Prepackaged Plex plugin because it was the quickest easiest method to get it up and running and I am Lazy.
However the plugin update method has been iffy, slow, and only goes up to the latest public release. So I made this script that can now be dropped anywhere in a Plex Plugin, and when run as root with paid PlexPass account info it will scrape the Plex.tv site for the latest PlexPass version and can install it automatically (and very quickly, not dependent on database size.)

This might even work with little or no tweaking if you are not using the standard plugin.

Standard disclaimers apply. Understand what you are doing. Make your backups. Call your mother. etc
Don't blame me if it sets fire to your server.
 

TimmelTV

Cadet
Joined
May 17, 2014
Messages
3
Hi mstinaff,

Thanks for the development on a good plugin! PlexPass Members really appreciate it so we can have the latest version.
But when downloading the PMS_Updater.sh from github and uploading into FreeBSD it just gives error message:
Error: This file was not identified as in PBI format, it might well be corrupt.

Something possibly wrong with the file?

Regards,
Timmel
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
Hi mstinaff,

Thanks for the development on a good plugin! PlexPass Members really appreciate it so we can have the latest version.
But when downloading the PMS_Updater.sh from github and uploading into FreeBSD it just gives error message:
Error: This file was not identified as in PBI format, it might well be corrupt.

Something possibly wrong with the file?

Regards,
Timmel

What you have to do is as fallows:

1. Login with SSH to your FreeNAS (or alternatively go to shell in WebGUI)
2. type: 'jls' (without ' ' ) and take the note of the # of jail of your Plex installation
3. type: 'jexec # csh' (where # is the number of the jail noted in last step)
4. type: 'fetch -o PMS_Updater.sh https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh'
5. type: 'chmod 755 PMS_Updater.sh'
6. type: './PMS_Updater.sh -u PlexPass_User -p PlexPass_password -a'

after that you'll be updated to the latest PlexPass version. To update again you do steps 1,2,3 and 6.

like mstinaff wrote remember: Standard disclaimers apply. Understand what you are doing. Make your backups. Call your mother. etc
 
Status
Not open for further replies.
Top