jhschulz 3 Posted November 27, 2018 Posted November 27, 2018 Hi, I know, this has already been discussed several times, but I'm still confused what to do. When I started to use Emby, I installed it on a Debian system using the opensuse repo. When there was no new version available anymore through this repo, I read all the forum threads about how to upgrade, but did not really understand what to do and decided to keep using the old version first. I continued to use version 3.3.1.0 until a few weeks ago, when the Emby Android app complained about the old server version. I did an "update" to 3.4.1.0 by downloading the mono zip file and manually replacing the files, like described here: https://emby.media/community/index.php?/topic/58613-question-about-my-32-bit-upgrade/?p=574032 I also downloaded the mono zip of version 3.5.0.0 but did not use it, because it needs a newer Mono version, which I don't have. Instead of upgrading my Mono version I would rather like to stop "hacking" my old version and instead switching to the new official packages. But, even after reading many many threads about this, I still don't know how to do this without losing any data. I don't want to lose any Emby configurations, users, watched states and manually changed meta data. I do have some movies that are not correctly identified by Emby. It's no problem to change this when the movie is newly added, but to check all movies again would be a problem. I also changed the images of some movies. Is there a way to remove the old emby version and install the new package without losing any data and without a complete library re-scan with a complete re-download of all meta data?
Luke 42078 Posted November 27, 2018 Posted November 27, 2018 First, this may not go perfectly, so we need to be open and honest about that. What you can do is uninstall your current package, including purging it. Then install the new one. You should take a backup of the server's data folder. Then when starting the new server, it should use your old data path, but we've seen on some systems this doesn't happen. A sym link may be required here if that's the case.
jhschulz 3 Posted November 28, 2018 Author Posted November 28, 2018 What exactly is the "server's data folder"? Is this /var/lib/emby-server or is there anything else to backup? Would the following process work? 1) Stop the server [systemctl stop emby-server] 2) Rename the data folder to protect it from changes or deletion by the following steps. [mv /var/lib/emby-server /var/lib/emby-server_bak] 3) Uninstall and purge the current installation [apt-get purge emby-server] 4) Install the new package (latest version or the same version previously installed?) 5) Stop the new server, if it has been started by the installation [systemctl stop emby-server] 6) Remove the new server's data folder created by the new installation (/var/lib/emby-server or /var/lib/emby) 7) Rename the old data folder to it's original name. [mv /var/lib/emby-server_bak /var/lib/emby-server] 8) Create a sym link if the new server installation created a data folder with a different name [ln -s /var/lib/emby-server /var/lib/emby] 9) Start the server [systemctl start emby-server]
Luke 42078 Posted November 28, 2018 Posted November 28, 2018 The location varies per platform. If you restart the server, the program data path is printed at the top of the server log. You can use the logs page in the server dashboard to find that.
jhschulz 3 Posted November 29, 2018 Author Posted November 29, 2018 (edited) I successfully upgraded to version 3.5.3.0 following the 9 steps I wrote in my last post. I only had to add another step: Removing the old installation with "apt-get purge emby-server" also removed the "emby" linux user and group. The new installation created a new emby user and group, but the saved data folder (/var/lib/emby-server) still had the old user and group. So I had to fix this with chown -R emby:emby /var/lib/emby-server between step 8 and 9. Edited November 29, 2018 by jhschulz
Andy777 21 Posted December 5, 2018 Posted December 5, 2018 (edited) What exactly is the "server's data folder"? Is this /var/lib/emby-server or is there anything else to backup? Would the following process work? 1) Stop the server [systemctl stop emby-server] 2) Rename the data folder to protect it from changes or deletion by the following steps. [mv /var/lib/emby-server /var/lib/emby-server_bak] 3) Uninstall and purge the current installation [apt-get purge emby-server] 4) Install the new package (latest version or the same version previously installed?) 5) Stop the new server, if it has been started by the installation [systemctl stop emby-server] 6) Remove the new server's data folder created by the new installation (/var/lib/emby-server or /var/lib/emby) 7) Rename the old data folder to it's original name. [mv /var/lib/emby-server_bak /var/lib/emby-server] 8) Create a sym link if the new server installation created a data folder with a different name [ln -s /var/lib/emby-server /var/lib/emby] 9) Start the server [systemctl start emby-server] I can verify that the instructions in the previous posts work (with a small addition) on Ubuntu 16.04 when upgrading from the Opensuse repo mono version to the latest .net core deb package. In addition to the previous, I had to clear the cache folder. Otherwise the server plugins wouldn't update. I added that as the step 8.7. # Upgrade to latest .Core Emby on Ubuntu 16.04 running Opensuse repo mono version of emby #1) Stop the server sudo systemctl stop emby-server sudo systemctl disable emby-server #2) Rename the data folder to protect it from changes or deletion by the following steps. sudo mv /var/lib/emby-server /var/lib/emby-server_bak #3) Uninstall and purge the current installation (I needed apt autoremove to purge unused mono components) sudo apt-get -y purge emby-server sudo apt autoremove #4) Download and install the new package wget https://github.com/MediaBrowser/Emby.Releases/releases/download/3.5.3.0/emby-server-deb_3.5.3.0_amd64.deb sudo dpkg -i emby-server-deb_3.5.3.0_amd64.deb rm emby-server-deb_3.5.3.0_amd64.deb #5) Stop the new server, if it has been started by the installation sudo systemctl stop emby-server #6) Remove the new server's data folder created by the new installation sudo rm -rf /var/lib/emby #7) Rename the old data folder to it's original name. sudo mv /var/lib/emby-server_bak /var/lib/emby-server #8) Create a sym link if the new server installation created a data folder with a different name sudo ln -s /var/lib/emby-server /var/lib/emby #8.5) Give ownership of files to new emby username sudo chown -R emby:emby /var/lib/emby-server #8.7) Clear the cache (plugins would't update without this step for me) sudo cd /var/lib/emby/cache && sudo rm -rf * #9) Start the server sudo systemctl start emby-server This was all to get a fully working updated Emby server with old settings and media preserved. Thanks to the OP for saving a lot of my time! Andy777 Edited December 5, 2018 by Andy777
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now