Access Plex Database update and backup

Status
Not open for further replies.

Martin Jones

Dabbler
Joined
Feb 9, 2016
Messages
48
FreeNAS-11.2-BETA2
(Build Date: Aug 1, 2018 19:7)
Processor:
Intel(R) Celeron(R) CPU G1610T @ 2.30GHz (2 cores)
Memory:
16 GB
HP Microserver 1610

Confused of London

OK, Im trying to do two things here. Plex has a file called the "Webtools Bundle" which gives access to a list of usable extras when added to the Plugins folder of the Plex Database folder which is stored here:

usr/local/plexdata-plexpass/Plex Media Server/Plug-ins.

I have to place the webtools folder in this location. I have no idea after 3 days of searching how to access the database file. In the old warden system I had it up and running like a dream. I accessed it through an SMB share I think and copied the relevant file to it.

Once this has been done, I would like to back up the Plex Database folder so that I don't experience the same problems I had with getting to grips with the new 11.2 Beta and iocage creation. I had to rebuild Plex 2 or 3 times. Great learning experience but frustrating all the same. I would like to either copy the whole database file to a new location and point plex to it or better still back it up without moving it.

usr/local/plexdata-plexpass/Plex Media Server

My base location is mnt/iocage/jails/plex/root/

I found this example but makes little sense

https://www.stephen-scotter.net/computers/freenas/copying-plex-data-from-one-freenas-jail-to-another

I also have the Plex instructions but are limited to just explaining the process not the actions

https://support.plex.tv/articles/201370363-move-an-install-to-another-system/

Again of little use, any help would be fantastic.
 

Martin Jones

Dabbler
Joined
Feb 9, 2016
Messages
48

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
OK, Im trying to do two things here. Plex has a file called the "Webtools Bundle" which gives access to a list of usable extras when added to the Plugins folder of the Plex Database folder which is stored here:

usr/local/plexdata-plexpass/Plex Media Server/Plug-ins.

I have to place the webtools folder in this location. I have no idea after 3 days of searching how to access the database file. In the old warden system I had it up and running like a dream. I accessed it through an SMB share I think and copied the relevant file to it.
What do you mean by "I have no idea after 3 days of searching how to access the database file?" Do you mean that you can't find the Plug-ins folder?

Some more information will help:
1) Did you use the Plex plugin, or create a jail and install Plex yourself?
2) If you did your own install, did you install Plex or the standard Plexpass version?

If you created a jail and did your own install, the pathname should look something like "/mnt/iocage/jails/JAILNAME/root/usr/local/plexdata-plexpass/Plex Media Server/Plug-ins" where JAILNAME is the name assigned by iocage. Since 'Plex Media Server' has spaces in the name, you have to enclose the entire pathname in quotes as I did (FreeBSD OS does not automatically recognize spaces in paths and file names.)

Once this has been done, I would like to back up the Plex Database folder so that I don't experience the same problems I had with getting to grips with the new 11.2 Beta and iocage creation. I had to rebuild Plex 2 or 3 times. Great learning experience but frustrating all the same. I would like to either copy the whole database file to a new location and point plex to it or better still back it up without moving it.

usr/local/plexdata-plexpass/Plex Media Server

My base location is mnt/iocage/jails/plex/root/
Why did you install Plex more than once?
Are you comfortable using the Shell and the command line?
These instructions are old and not correct for an installation based on FreeNAS 11. Ignore them.
I also have the Plex instructions but are limited to just explaining the process not the actions

https://support.plex.tv/articles/201370363-move-an-install-to-another-system/

Again of little use, any help would be fantastic.
These Plex instructions assume you know something about navigating your file system and that you are comfortable using the command line.
 
Last edited:

Martin Jones

Dabbler
Joined
Feb 9, 2016
Messages
48
OK Right from the top. You should see from my post my first entry actually pointed to the plugins folder. So yes I did know where it was. Unfortunately, I don't know how to place the file in the plugins folder. I created my database 3 years ago and I believe in the old warden system I created a share and placed the files from there. From what I have tried this isn't possible in Iocage.

I Created the 11.1 jail in Iocage, not the plugin, from various screens I found online and created a cheat sheet so I would remember again. Also had to change a screen that allowed me to update to the latest version as and when it was available and not the quarterly version. If you look at my original post my route to the plugins folder is exactly the same as yours without the " " at each end. I also made mistakes along that way which is why I had to do it three times. Now it works perfectly. Except for these two extra challenges.

I think I am comfortable with shell and command lines after spending many years in airline reservation systems. Command lines were the only thing we had. Just FreeNAS is very different.

I look forward to any assistance you can offer and thanks in advance
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I think I am comfortable with shell and command lines after spending many years in airline reservation systems. Command lines were the only thing we had. Just FreeNAS is very different.
Keep in mind that the commands in Windows are not the same as in FreeBSD (the operating system for FreeNAS.) It takes a while to learn the differences.

So the two extra challenges are:
1) Add Webtools Bundle to the Plug-ins folder
2) Make a backup of the Plex database.

- What is the complete path name to your Plug-ins folder? Can you 'cd' into the folder?
- What is the complete path name to your Plex Data base?
- Where do you store your media on the FreeNAS system?
- Where is the Webtools.bundle folder located that you want to copy into the Plug-ins folder?
 

sdcook2

Cadet
Joined
Sep 15, 2018
Messages
1
I'm not sure about question 1 but I would do the following for you database (question 2). It's not really a backup but it would allow your database to be on a different share that you could map to your Plex jail.

Note: I'm still using 11.1-6 STABLE build.

Please note that the following instructions are for regular plexmediaserver. If you're using Plex Pass then append "_plexpass" to "plexmediaserver".

1) Create a share via storage for your Plex data.
2) Map that storage to a directory in your Plex jail.
3) Stop your plex server (server plexmediaserver stop").
4) Copy your /usr/local/plexdata to your newly mapped directory.
5) Remove your /usr/local/plexdata dir.
6) Remove the map of directory you previously mapped.
7) Map the storage with your Plex data to /usr/local/plexdata.8) Make sure the that mapped dir has the correct permissions (chown -R plex : plex /usr/local/plexdata).
9) Start your Plex service (service plexmediaserver start).

Having your plex server data stored on a shared and mapped to the correct directory should allow you to throw away jails and start over without losing your Plex configuration (channels, metadata, etc).

Hope this helps with your questions.
 

Martin Jones

Dabbler
Joined
Feb 9, 2016
Messages
48
Keep in mind that the commands in Windows are not the same as in FreeBSD (the operating system for FreeNAS.) It takes a while to learn the differences.

So the two extra challenges are:
1) Add Webtools Bundle to the Plug-ins folder
2) Make a backup of the Plex database.

- What is the complete path name to your Plug-ins folder? Can you 'cd' into the folder?
- What is the complete path name to your Plex Data base?
- Where do you store your media on the FreeNAS system?
- Where is the Webtools.bundle folder located that you want to copy into the Plug-ins folder?

OK the complete path for plugin forlder is
mnt/iocage/jails/plex/root/usr/local/plexdata-plexpass/Plex Media Server/Plug-ins

For the Database exactly the same
mnt/iocage/jails/plex/root/usr/local/plexdata-plexpass/Plex Media Server

Path for media
mnt/Systems/Access/Martin/Media

The webtools.bundle folder is on my laptop in windows 10
 
Last edited:

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
OK the complete path for plugin forlder is
mnt/iocage/jails/plex/root/usr/local/plexdata-plexpass/Plex Media Server/Plug-ins

For the Database exactly the same
mnt/iocage/jails/plex/root/usr/local/plexdata-plexpass/Plex Media Server

Path for media
mnt/Systems/Access/Martin/Media

The webtools.bundle folder is on my laptop in windows 10
Great! There are a couple of ways to get the webtools.bundle folder to your Plex jail.
1. You could make an SMB share to the Plug-ins folder, and then copy webtools.bundle from your windows machine to the Plug-ins folder.
**Edit: This does not work. One cannot create an SMB share to a folder inside the iocage jail.

2. You could make a new folder on your FreeNAS that could act as a temporary place to store files, create an SMB share to that folder, copy the webtools.bundle from your PC to that folder, and then use the FreeNAS Shell to copy the webtools from that folder to the Plex Plug-ins folder. For instance, you could create a new folder under 'Martin' to keep things that are not media.

I personally use the second approach:
On my FreeNAS, I have a folder named 'Backup' that is used for keeping backups of various things, including a backup of my Plex database. I have an SMB share set up for that folder. My 'Backup' folder is mostly used for maintaining backups of things on my FreeNAS, but it also provides a convenient way to copy things between my FreeNAS and other machines.

**You will probably need to stop the Plex service in your jail before copying the webtools to the Plug-ins folder. Don't forget to start the service again.
 
Last edited:

Martin Jones

Dabbler
Joined
Feb 9, 2016
Messages
48
Great! There are a couple of ways to get the webtools.bundle folder to your Plex jail.
1. You could make an SMB share to the Plug-ins folder, and then copy webtools.bundle from your windows machine to the Plug-ins folder.
2. You could make a new folder on your FreeNAS that could act as a temporary place to store files, create an SMB share to that folder, copy the webtools.bundle from your PC to that folder, and then use the FreeNAS Shell to copy the webtools from that folder to the Plex Plug-ins folder. For instance, you could create a new folder under 'Martin' to keep things that are not media.

I personally use the second approach:
On my FreeNAS, I have a folder named 'Backup' that is used for keeping backups of various things, including a backup of my Plex database. I have an SMB share set up for that folder. My 'Backup' folder is mostly used for maintaining backups of things on my FreeNAS, but it also provides a convenient way to copy things between my FreeNAS and other machines.

**You will probably need to stop the Plex service in your jail before copying the webtools to the Plug-ins folder. Don't forget to start the service again.

Thanks very much for your reply.

In 11.1 and the warden system for jails, and before my microserver crashed, I used your version 1 in exactly the same way to add the Webtools file to the plugins folder. Worked perfectly. Since I've recreated the whole thing in the new beta 2/3 version and Iocage, that doesn't appear to work. When trying to set up the share to the plugin folder I get this response.

"The path must reside within a volume mount point" DUH?

After trying to solve this issue by searching the internet and these forums without t success I thought I'd try to find another way.

You're right in as much as the learning curve from Windows to FreeNAS is huge and wish that I had stuck with windows for simplicity, not quality. Unfortunately we are where we are and to transfer all of that data back from ZFS would be a bigger nightmare.

I do not know, or know where to find FreeBSD entries which is why I was happy with the SMB share option.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
When I create a jail (whether it be the old warden style of the new iocage variety) and I might need to move files in/out of it, I create a mount point to a Temp dataset on my FreeNAS pool to /temp in the jail.

I then share (AFP for me, but use SMB if you like) the Temp dataset with my other machine(s). Adding files to the Temp dataset makes them available in the /temp jail folder and they can be copied/moved from here to wherever else in the jail.

This could be done using the WUI for old Warden jails, and I believe can be done in the WUI for new iocage jails from 11.2. You need to use the CLI before that using something like this:

Code:
iocage fstab -a <jail_name> '/mnt/<pool_name>/temp /temp nullfs rw 0 0'
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Thanks very much for your reply.

In 11.1 and the warden system for jails, and before my microserver crashed, I used your version 1 in exactly the same way to add the Webtools file to the plugins folder. Worked perfectly. Since I've recreated the whole thing in the new beta 2/3 version and Iocage, that doesn't appear to work. When trying to set up the share to the plugin folder I get this response.

"The path must reside within a volume mount point" DUH?
I tried a test on my own machine and confirmed that creating an SMB share directly to a folder inside the jail, does not work. I will edit my previous post accordingly.

However, my Option 2 should work. There is no reason why you couldn't copy the webtools.bundle to a temporary folder somewhere on your FreeNAS, then use the command line in the Shell to copy the bundle from that temporary folder to your Plex Plug-ins folder. You don't necessarily have to create a new folder... you could simply use one that already has an SMB share defined and copy the webtools.bundle to that folder. Once you do that, copying webtools from there to the Plex Plug-ins folder should be straightforward.
 

Martin Jones

Dabbler
Joined
Feb 9, 2016
Messages
48
I tried a test on my own machine and confirmed that creating an SMB share directly to a folder inside the jail, does not work. I will edit my previous post accordingly.

However, my Option 2 should work. There is no reason why you couldn't copy the webtools.bundle to a temporary folder somewhere on your FreeNAS, then use the command line in the Shell to copy the bundle from that temporary folder to your Plex Plug-ins folder. You don't necessarily have to create a new folder... you could simply use one that already has an SMB share defined and copy the webtools.bundle to that folder. Once you do that, copying webtools from there to the Plex Plug-ins folder should be straightforward.

I've finally learned enough entries to have a go at this and it worked perfectly. In fact I've learned so much I'm ecstatic. Thanks for your assistance.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Glad you got it sorted out. This is what makes a forum such as this so helpful. With a little patience, and willingness to learn, one can have a really great FreeNAS experience.

Perhaps, one of these days, you will be able to help someone else. :)
 

Martin Jones

Dabbler
Joined
Feb 9, 2016
Messages
48
Glad you got it sorted out. This is what makes a forum such as this so helpful. With a little patience, and willingness to learn, one can have a really great FreeNAS experience.

Perhaps, one of these days, you will be able to help someone else. :)

Yeah, do you see the flying pigs?
 
Status
Not open for further replies.
Top