Jump to content

New way to update Emby-Server ?


blastbass
Go to solution Solved by slevin7,

Recommended Posts

blastbass

Hello,

 

It's probably said many time, but what is the new way to update my emby-server without lose any config or data ? I don't want to lose special data (devices keys/hash not saved with the backup plugin)

 

I'm run on Debian with an "apt-get" installation. No new version when i try the "apt-get update".

 

Do you have a full procedure to upgrade to the further versions ?

Link to comment
Share on other sites

  • Solution
slevin7

wget https://github.com/MediaBrowser/Emby.Releases/releases/download/3.4.1.0/emby-server-deb_3.4.1.0_amd64.deb
sudo service stop emby-server
sudo dpkg -i emby*

At least this is the way i do this and never had a problem with loosing any data.

By the way the Link is a sample. normaly i grab them by right klick on the Link and than copy url.

  • Like 2
Link to comment
Share on other sites

Yea to update you just install the latest over the top of your existing version. Thanks.

  • Like 1
Link to comment
Share on other sites

lunix33

Hey if you want I've created a script which can be used to do the update, It might not be perfect but it's working for me.

 

https://gist.github.com/lunix33/4264570fb89963ea3a6425c88274483e

 

Just download and run (You'll need nodejs installed).

 

If you have error while doing library scan, try running the following command:

 

```

#> ln -s /var/lib/emby /var/lib/emby-server

```

 

The new version seem to be using a different folder in the lib directory, and be doing the last command you'll link.

If you have anything using the old path it will still work just fine, and the new emby version will work as expected!

Link to comment
Share on other sites

whytea

Hi

I tried to update my emby-server this way but it crashed.

root@emby:~# /etc/init.d/emby-server status
● emby-server.service - Emby Media Server
   Loaded: loaded (/lib/systemd/system/emby-server.service; enabled)
   Active: failed (Result: exit-code) since Mi 2018-05-16 13:00:58 CEST; 14s ago
  Process: 1023 ExecStopPost=/usr/bin/emby-server clear (code=exited, status=0/SUCCESS)
  Process: 548 ExecStart=/usr/bin/emby-server start (code=exited, status=143)
 Main PID: 548 (code=exited, status=143)

Mai 16 12:53:53 emby emby-server[548]: _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
Mai 16 12:53:53 emby emby-server[548]: _STATISTICS_WRITING_DATE_UTC: 2018-05-12 23:44:34
Mai 16 12:53:53 emby emby-server[548]: _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-12 23:44:34
Mai 16 12:53:53 emby emby-server[548]: _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Mai 16 12:53:53 emby emby-server[548]: _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Mai 16 13:00:58 emby systemd[1]: Stopping Emby Media Server...
Mai 16 13:00:58 emby systemd[1]: emby-server.service: main process exited, code=exited, status=143/n/a
Mai 16 13:00:58 emby emby-server[548]: Sitzung abgebrochen, Shell wird beendet ... ... abgebrochen.
Mai 16 13:00:58 emby systemd[1]: Stopped Emby Media Server.
Mai 16 13:00:58 emby systemd[1]: Unit emby-server.service entered failed state.
root@emby:~# sudo dpkg -i emby*
(Lese Datenbank ... 43959 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von emby-server-deb_3.4.1.0_amd64.deb ...
Stopping Emby Server!
Entpacken von emby-server (3.4.1.0) über (3.3.1.0+68.1) ...
emby-server (3.4.1.0) wird eingerichtet ...
Neue Version der Konfigurationsdatei /etc/emby-server.conf wird installiert ...
Neue Version der Konfigurationsdatei /etc/init/emby-server.conf wird installiert ...
Synchronizing state for emby-server.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d emby-server defaults
Executing /usr/sbin/update-rc.d emby-server enable
Failed to execute operation: File exists
Trigger für libc-bin (2.19-18+deb8u10) werden verarbeitet ...

If I now open the webif the installation wizard appears.

 

I tried it 3 times. :-(

 

 

Is there a way to fix this?

Edited by whytea
Link to comment
Share on other sites

whytea

Now I also tried the above mentioned script.

 

The update seems to work but the configuration is gone and the installation wizard appears.

Link to comment
Share on other sites

If you have error while doing library scan, try running the following command:

 

```

#> ln -s /var/lib/emby /var/lib/emby-server

```

 

Or in /etc/emby-server.conf, change

 

EMBY_DATA=/var/lib/emby

 

to

 

EMBY_DATA=/var/lib/emby-server

Link to comment
Share on other sites

Letters

Is there going to be an automated update path?

 

I really don't think people should need to lurk on forums to figure out their current update channel is deprecated. With so many people reporting problems switching from mono builds I haven't done it yet.

  • Like 1
Link to comment
Share on other sites

Is there going to be an automated update path?

 

I really don't think people should need to lurk on forums to figure out their current update channel is deprecated. With so many people reporting problems switching from mono builds I haven't done it yet.

 

Most likely yes, but you don't need to check the forums to be alerted of new releases. Your server will also tell you when a new release is available, right on the server dashboard.

  • Like 1
Link to comment
Share on other sites

Letters

Most likely yes, but you don't need to check the forums to be alerted of new releases. Your server will also tell you when a new release is available, right on the server dashboard.

I was referring to the opensuse repo no longer being used, not the update notifications which work great. Good to hear there will likely be a hands-off solution.

Link to comment
Share on other sites

whytea

Or in /etc/emby-server.conf, change

 

EMBY_DATA=/var/lib/emby

 

to

 

EMBY_DATA=/var/lib/emby-server

 

Hmm if I understand this correct...

 

If my emby-server is installed in /var/lib/emby I have to change the path to /var/lib/emby-server.

Please correct me if I'm wrong but my emby-server is already installed in /var/lib/emby-server.

 

root@emby:~# /etc/init.d/emby-server status
● emby-server.service - Emby Media Server
   Loaded: loaded (/lib/systemd/system/emby-server.service; enabled)
   Active: active (running) since Mi 2018-05-16 16:02:18 CEST; 18h ago
 Main PID: 501 (su)
   CGroup: /system.slice/emby-server.service
           ├─501 su -s /bin/sh -c umask $0; exec "$1" "$@" emby -- 002 env MAGICK_HOME=/usr/lib/emby-server MAGICK_CODER_FILTER_PATH=/usr/lib/emby-server/x86_64-linux-gnu/EmbyMagick-6.9.6/modules-Q8/filters M...
           └─624 /usr/bin/mono-sgen --optimize=all /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh

Mai 16 16:04:50 emby emby-server[501]: NUMBER_OF_FRAMES: 118188
Mai 16 16:04:50 emby emby-server[501]: NUMBER_OF_FRAMES-eng: 118188
Mai 16 16:04:50 emby emby-server[501]: NUMBER_OF_BYTES : 36414826
Mai 16 16:04:50 emby emby-server[501]: NUMBER_OF_BYTES-eng: 36414826
Mai 16 16:04:50 emby emby-server[501]: _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
Mai 16 16:04:50 emby emby-server[501]: _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
Mai 16 16:04:50 emby emby-server[501]: _STATISTICS_WRITING_DATE_UTC: 2018-05-12 23:44:34
Mai 16 16:04:50 emby emby-server[501]: _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-12 23:44:34
Mai 16 16:04:50 emby emby-server[501]: _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Mai 16 16:04:50 emby emby-server[501]: _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
root@emby:~# ls -liah  /var/lib/ | grep emby
149175 drwxr-xr-x 13 emby  emby    4,0K Jun  6  2017 emby-server

 

Link to comment
Share on other sites

Of course I've read other thread here to find a solution.

Something I often read is that it is impossible to update from the legacy-package to the new one.

 

I may be reaching for a straw, but what exactly is the legacy-package?

Till this update I use this repo http://download.opensuse.org/repositories/home:/emby/Debian_8.0/.

 

Is this the legacy-package??

 

Yes it is.

  • Like 1
Link to comment
Share on other sites

Hmm if I understand this correct...

 

If my emby-server is installed in /var/lib/emby I have to change the path to /var/lib/emby-server.

Please correct me if I'm wrong but my emby-server is already installed in /var/lib/emby-server.

 

The legacy package is set up to store data in /var/lib/emby-server, and the new package is set up to store it in /var/lib/emby

 

So, assuming you haven't upgraded yet:

 

Stop emby server (sudo systemctl stop emby-server)

Make a backup of your current /var/lib/emby-server, just in case

Uninstall the legacy package (sudo dpkg -r emby*)

Search for any remaining emby files in /etc and delete them.

Install the new package (sudo dpkg -i emby*)

Stop emby server (sudo systemctl stop emby-server)

Edit /etc/emby-server-conf and change the existing line to EMBY_DATA=/var/lib/emby-server

Delete /var/lib/emby

Start emby-server (sudo systemctl start emby-server)

Edited by arco
  • Like 2
Link to comment
Share on other sites

whytea

The legacy package is set up to store data in /var/lib/emby-server, and the new package is set up to store it in /var/lib/emby

 

So, assuming you haven't upgraded yet:

 

Stop emby server (sudo systemctl stop emby-server)

Make a backup of your current /var/lib/emby-server, just in case

Uninstall the legacy package (sudo dpkg -r emby*)

Search for any remaining emby files in /etc and delete them.

Install the new package (sudo dpkg -i emby*)

Stop emby server (sudo systemctl stop emby-server)

Edit /etc/emby-server-conf and change the existing line to EMBY_DATA=/var/lib/emby-server

Start emby-server (sudo systemctl start emby-server)

Thanks for that!

It seems to work fine!

 

May I delete /var/lib/emby now or is it still in use?

If it is still in use is there a way to merge /var/lib/emby-server and /var/lib/emby?

Edited by whytea
Link to comment
Share on other sites

May I delete /var/lib/emby now or is it still in use?

If it is still in use is there a way to merge /var/lib/emby-server and /var/lib/emby?

You can delete it.

Link to comment
Share on other sites

whytea

You can delete it.

 

Ok ;-)

 

Since the new default is /var/lib/emby and I want I to avoid future confusion the next steps for me are:

 

- stop emby

- delete /var/lib/emby

- rename /var/lib/emby-server to /var/lib/emby

- change the path in /etc/emby-server.conf back to /var/lib/emby

- start emby

 

Does that make sense in your opinion?

Link to comment
Share on other sites

whytea

hmm I tried this but it does not work.

After I rename, changed the path most thumbnails in the video database are gone and if I try to change a thumbnail the emby-server crashes.

After I changed all back everything works fine again.

 

A bit confused about it! :huh:

Edited by whytea
Link to comment
Share on other sites

Ok ;-)

 

Since the new default is /var/lib/emby and I want I to avoid future confusion the next steps for me are:

 

- stop emby

- delete /var/lib/emby

- rename /var/lib/emby-server to /var/lib/emby

- change the path in /etc/emby-server.conf back to /var/lib/emby

- start emby

 

Does that make sense in your opinion?

I wouldn't do that if I were you. The problem is that the path to your media is hard coded to emby-server in your old databases. So you'll end up with a broken system. Maybe there's a way to change all the paths in the databases, but if not then you're better off starting from fresh if you want to use /var/lib/emby

  • Like 1
Link to comment
Share on other sites

whytea

I wouldn't do that if I were you. The problem is that the path to your media is hard coded to emby-server in your old databases. So you'll end up with a broken system. Maybe there's a way to change all the paths in the databases, but if not then you're better off starting from fresh if you want to use /var/lib/emby

Ahh ok that explain it. thx again!

Link to comment
Share on other sites

Pasha1402

Did the same as above (Ubuntu 16.04 host). Everything worked out fine except: collections within movies are gone and became new library called "Collections" with content of original collections within original movie library... odd.

 

Any idea how to avoid such behavior?

Link to comment
Share on other sites

Did the same as above (Ubuntu 16.04 host). Everything worked out fine except: collections within movies are gone and became new library called "Collections" with content of original collections within original movie library... odd.

 

Any idea how to avoid such behavior?

Something similar happened for me too, and I couldn't figure out how to get my collections back. Probably need to set them up all over again. :(

Link to comment
Share on other sites

zenwryly

For anyone who was using the old OpenSUSE APT repository and would like to keep using APT to keep their Emby server's up to date, I've built a simple utility that builds a simple APT repository from the official Emby *.deb releases.  Let me know if you have any issues.

Link to comment
Share on other sites

  • 4 weeks later...
nicheplayer

The legacy package is set up to store data in /var/lib/emby-server, and the new package is set up to store it in /var/lib/emby

So, assuming you haven't upgraded yet:

Stop emby server (sudo systemctl stop emby-server)

Make a backup of your current /var/lib/emby-server, just in case

Uninstall the legacy package (sudo dpkg -r emby*)

Search for any remaining emby files in /etc and delete them.

Install the new package (sudo dpkg -i emby*)

Stop emby server (sudo systemctl stop emby-server)

Edit /etc/emby-server-conf and change the existing line to EMBY_DATA=/var/lib/emby-server

Delete /var/lib/emby

Start emby-server (sudo systemctl start emby-server)

Thank you for posting this. If I’ve already downloaded the 3.4.1.deb and use the dpkg -r emby* command, will that command remove *only* installed packages? I.e., not the new one I just downloaded?

Link to comment
Share on other sites

Thank you for posting this. If I’ve already downloaded the 3.4.1.deb and use the dpkg -r emby* command, will that command remove *only* installed packages? I.e., not the new one I just downloaded?

Yes, it only removes what's installed.

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