Jump to content

Two Emby Jails in TrueNAS 12?


cgcmgr
Go to solution Solved by FrogMaster,

Recommended Posts

Hi everyone,

 

I had one Emby Jail for the longest time and it was created via the plugin in the TrueNas Plugins section.  The Jail was simply named Emby.   I had some issues with it after updating once and was asked to run the following command to fix it:

git clone -b truenas12 https://github.com/MediaBrowser/iocage-amd64.git

cd iocage-amd64

iocage fetch -P emby-server.json dhcp="on" ip6="inherit" allow_mlock="on" --branch truenas12

iocage set plugin_repository='https://github.com/MediaBrowser/iocage-amd64.git' emby-server.

 

All this did was create another jail named emby-server.  I was like, ok, cool I have two now.  I'll use this one as a back up in case something happens to the original one.  This way while I work on trying to fix it, I can still access my media.  Well, something happened to the original Emby Jail and I had to delete it.  

I'd like to create a new one so that I have two again.  Since the existing Jail was created via the command above, can I simply just go the TrueNAS Plugins section and select Emby and it will create a new Jail named Emby and I'll be all set?  If not, is there a way to use the above command, but append the name to be something other emby-server?  Is it as simple as replacing emby-server at the end of the command with a different name?

 

Lastly, if I can just select the Plugin from the Plugins section, which do I choose?  I see Emby and Emby Server.

 

I'd greatly appreciate any assistance.

 

Thanks,

Chris

Plugins.JPG

Link to comment
Share on other sites

adrianwi

As you've stated in the OP it's pretty straightforward to create an emby jail in TrueNAS 12 so I'm not sure why you'd need a backup?

I'd recommend mounting the var/db/emby-server folder in its own dataset outside of the jail, in a similar way I'm sure you mount your media files.  That makes recreating things even easier as you have a backup of all your configuration settings too.

Don't be tempted to mount this into two different jails though, as that will f**k everything up 🙃

 

 

Link to comment
Share on other sites

Hi adrianwi,

 

Thanks for replying.  You're right, I don't need a back up server, but it would be nice to have in case my main one goes down and I have issues getting it restored.  I'll at least have the backup working as I repair the main one.

I hear a lot of people saying to mount that folder in its own Dataset outside of the Jail.  My issue with that is, I don't know how to do it.  Currently, Emby is installed inside of iocage (See attachment).  I do on occasion (monthly) backup the var/db/emby-server folder to a drive on my Windows machine, so I can copy it back in case anything happens.  So my understanding is, if something goes bad with my Jail, I can restore the Jail from a Snapshot and then copy back the emby-server folder and I should be good.  Is that correct?

Is there a way I can set the var/db/embey-server folder to be in a different Dataset?

 

Thanks,

Chris

Pool.JPG

Link to comment
Share on other sites

adrianwi

I think the easiest way to do this is:

1. Within the emby jail, move the /var/db/emby-server folder to /var/db/emby-bak

2. Create a dataset on your pool to store the emby-server data (I called mine embydb)

3. Mount the new dataset into the emby jail in a similar fashion to you would the media folders (my setting below as an example)

4. Within the emby jail, copy all of the files and folders from /var/db/emby-bak to /var/db/emby-server (which is now actually your new dataset)

 

Screenshot 2023-09-23 at 09.56.11.jpg

  • Thanks 1
Link to comment
Share on other sites

Sorry for the late reply.  I will give it a try.  Not really too familiar with moving data within a Jail, but I'll give it a try.  I'll let you know how I make out and if I need any further assistance.

 

Thanks

  • Thanks 1
Link to comment
Share on other sites

FrogMaster

I'm a frequent user of TrueNAS Core. I use to previously have two manually created jails so I could test future beta releases. I don't do this anymore and just kind of hope nothing goes wrong when I update now, but it's a pretty manageable task should you want to maintain two jails.

You can either

  1.  Follow the install steps again, but change the target jail name so another jail is created. For example:
    iocage set plugin_repository='https://github.com/MediaBrowser/iocage-amd64.git' emby-testserver

    OR

  2. You can Install from the plugin, this will not affect your current "Emby-Server" jail it should make a new one.

Once you've created either of these Jails, you should be able to mount your server's media data again, and they'll work in conjunction.
Personally, I would suggest manually creating the Jail rather than using the TrueNAS plugin system, I found it tends to lag behind and it's easier to just manage the install/jail yourself.

Link to comment
Share on other sites

cgcmgr

Thank you FrogMaster.  That's all I was looking for.  I just wanted to make sure I could create another jail manually without causing any harm to the original jail.  I figured I could just change the jail name at the end, but I wasn't sure if this would work or not.  Being you've done it before, I guess it will work.  I'll give it a shot.

 

Thanks,
Chris

Link to comment
Share on other sites

FrogMaster:

 

I did what you suggested and it did not work.  The normal steps for manually creating an emby jail are:

1.git clone -b truenas12 https://github.com/MediaBrowser/iocage-amd64.git 

2. cd iocage-amd64

3. iocage fetch -P emby-server.json dhcp="on" ip6="inherit" allow_mlock="on" --branch truenas12

4. iocage set plugin_repository='https://github.com/MediaBrowser/iocage-amd64.git' emby-server

 

Here is what I experienced:

1. When doing step 1, I get a message that says "fatal: destination path 'iocage-amd64' already exists and is not an empty directory"

2. So I just follow step 2 and change directory to iocage-amd64

3. I then follow step 3 and this is the step that actually creates the new emby jail and names it emby-server

4. If I try the command iocage set plugin_repository='https://github.com/MediaBrowser/iocage-amd64.git' emby-test I get a message that says "Jail 'emby-test' not found!"

 

That being said, if I just run the command iocage fetch -P emby-server.json dhcp="on" ip6="inherit" allow_mlock="on" --branch truenas12, a new emby-server jail is created with a name of emby-server_1.  I guess I can live with that, but I wish I could change the name.

 

I also encountered something that I wasn't too happy about.  I was originally on TrueNAS 12.  I ran the above commands to create the Jail manually.  I then updated to TrueNAS 13.  Being on TrueNAS 13 I ran this command to create a new Emby server - iocage fetch -P emby-server.json dhcp="on" ip6="inherit" allow_mlock="on" --branch master, as that is the command to manually create a Jail on TrueNAS 13.  I received a message that the Jail was going to be created as a 12.4 Jail.  I thought it would be a 13 Jail.  I guess because iocage was originally created in TrueNAS 12, all Jails created in it would be based on a 12 Jail.  The Jail created, but the 13 version of Emby installed.  Of course Emby would not launch.  I then had to upgrade the Jail to 13.2 and then Emby worked.

Link to comment
Share on other sites

  • 3 weeks later...
  • Solution
FrogMaster

You should be able to rename your new jail with the following command

iocage rename emby-server_1 emby-test


I'm glad to hear you were able to get it to work though. :)

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...