Jump to content

Emby Server update on TrueNAS jail


mattia3rd
Go to solution Solved by mattia3rd,

Recommended Posts

mattia3rd

Hi,

I'm reading some posts here in the forum because I want to upgrade my Emby Server, currently 4.6.2.0, to the latest version.

The first time I installed the plugin I created a jail, installed some components as per documentation and finally installed the Emby Server with

pkg add -f  https://github.com/MediaBrowser/Emby.Releases/releases/download/4.5.4.0/emby-server-freebsd12_4.5.4.0_amd64.txz 

Now, I'd follow these steps:

1. shutdown emby server

2. snapshot the Pool of the Jail for safe rollback

3. upgrade Emby with this command to the latest release

# Install the binary package
pkg add --force https://github.com/MediaBrowser/Emby.Releases/releases/download/4.7.10.0/emby-server-freebsd13_4.7.10.0_amd64.pkg

4. start emby server

 

Have you any advice related to this procedure?

 

PS:
I think I'll need to update my jail OS too

root@myemby:~ # freebsd-version ; uname -a
12.2-RELEASE-p8
FreeBSD myemby 13.1-RELEASE-p2 FreeBSD 13.1-RELEASE-p2 n245412-484f039b1d0 TRUENAS  amd64

 

Edited by mattia3rd
Link to comment
Share on other sites

mattia3rd

OK, I gave it a try and in the first instance I upgraded the jail to TrueNAS 13.1

Thereafter I upgraded all the packages with 

pkg update && pkg upgrade

which upgraded Emby Server 

   emby-server: 4.5.4.0_1 -> 4.7.6.0_2

Now if I start the EmbyServer within the jail


root@myemby:/var/log # service emby-server start
Starting emby_server.
daemon: process already running, pid: 59231
/usr/local/etc/rc.d/emby-server: WARNING: failed to start emby_server

 

So here I'm stuck...

I really appreciate your help

 

 

 

Link to comment
Share on other sites

Hi, that's odd because if you originally installed from GitHub then I wouldn't expect the pkg upgrade to upgrade emby server.

Link to comment
Share on other sites

alucryd

@LukeIt's expected that pkg upgrade will do that, as the package we provide on GitHub has the same name as the one from the official repositories. It's a valid upgrade path since they are for the most part interchangeable.

@mattia3rdYou might be missing some dependencies, there have been a few new additions between 4.6 and 4.7. Cam you try installing the dependencies listed here in your jail?

https://emby.media/freebsd-server.html

Edited by alucryd
Link to comment
Share on other sites

adrianwi

There are different dependancies and versions of FreeBSD.  If it were me, I'd moved the /var/db/emby-server folder from your jail into its own dataset (mine is called embydb) and then create a new emby jail following the instructions here > https://emby.media/freebsd-server.html

In the same way you'd mount your media folders into the jail, mount the new dataset into the jail at /var/db/emby-server.  It makes rebuilding the jail simple (it can be done in 10-15 minutes) with the added benefit that if you want to backup just your user data, it's all in that new dataset.

 

 

Link to comment
Share on other sites

  • 2 weeks later...
  • Solution
mattia3rd
On 12/15/2022 at 7:10 PM, Luke said:

@mattia3rd has this helped?

@alucryd

 

Hi guys, thank you for sharing.

Let me spoiler the end first :

Spoiler

I upgraded successfully

It was quite an akward procedure but this is what I did.

1. I upgraded the Jail OS version to my current TrueNAS release 13.1

I started the embyServer within the jail and everything was still fine.

 

2. I upgraded all the packages within the jail with  

pkg update && pkg upgrade

and this automatically upgraded EmbyServer from

emby-server: 4.5.4.0_1 -> 4.7.6.0_2

I tried to start EmbyServer but it failed to start service, no matter what.

No solution here..

 

3. I manually upgraded to 4.7.10.0 but it failed because of missing dependencies: libexif, orc

I installed them manually.

 

4. I tried a manual upgrade to  4.7.10.0 and it succeded. 

EmbyServer started but I wasn't able to reach the UI.

 

5. I Searched on the forum and find something similar behaviour which required to set this value on the Jail properties

 iocage set allow_mlock=1 myjail

 

6. I started EmbyServer again and this time everything were fine.

 

 

All well that ends well

 

 

Edited by mattia3rd
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
make_nz
On 12/19/2022 at 6:32 PM, adrianwi said:

mount the new dataset into the jail at /var/db/emby-server.  It makes rebuilding the jail simple (it can be done in 10-15 minutes) with the added benefit that if you want to backup just your user data, it's all in that new dataset.

@adrianwiI would like to ask, what your long term experience is, with this approach, please?
I understand the concept, but you would always have to snapshot the the Jail and the Data before an upgrade, right!?
A rollback to an older Emby-Server without having a rollback for the data would cause problems, wouldn't it?

Link to comment
Share on other sites

17 hours ago, make_nz said:

@adrianwiI would like to ask, what your long term experience is, with this approach, please?
I understand the concept, but you would always have to snapshot the the Jail and the Data before an upgrade, right!?
A rollback to an older Emby-Server without having a rollback for the data would cause problems, wouldn't it?

@make_nzwhat exactly are you trying to do?

Link to comment
Share on other sites

adrianwi
On 05/03/2024 at 12:14, make_nz said:

@adrianwiI would like to ask, what your long term experience is, with this approach, please?
I understand the concept, but you would always have to snapshot the the Jail and the Data before an upgrade, right!?
A rollback to an older Emby-Server without having a rollback for the data would cause problems, wouldn't it?

I've been running my emby server like this for a number of years without any issues.  Before updating I take a snapshot of the jail (/mnt/pool/iocage/jails/emby) AND the emby user dataset (/mnt/pool/embydb).  If there is a problem and I need to rollback, I make sure to rollback both.  You are right though, rolling back one and not the other can lead to problems. 

 

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

  • 2 weeks later...
make_nz
On 3/7/2024 at 11:36 PM, adrianwi said:

You are right though, rolling back one and not the other can lead to problems. 

 

On 3/10/2024 at 9:24 PM, Luke said:

I've always kept embydb or similar config-data inside the Jail, so I never forget to snapshot one or the other and get into trouble.
So, was just curious.
And I will keep things other then media in the jail, as I can always mount an offline/broken jail and retrieve files that way.

  • 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...