Jellyfin Forum
Migrating from Debian to Ubuntu - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Migrating from Debian to Ubuntu (/t-migrating-from-debian-to-ubuntu)



Migrating from Debian to Ubuntu - Broom5229 - 2023-09-04

Hello all, I'm having an issue that I can't seem to find any answers for and I've been searching for a few hours. So I'm moving from an old, "gonna die any day" Debian machine to a much higher spec'd (by comparison) Ubuntu device. I mainly used this Reddit post since there doesn't seem to be any documentation on moving from Linux to Linux: https://www.reddit.com/r/jellyfin/comments/11tputc/migrate_a_linux_server_to_another_linux_server/. In keeping with that post, I installed Ubuntu on the new device, installed Jellyfin, moved my /etc/jellyfin and /var/lib/jellyfin directories over, and changed the permissions using chmod 777 (I know that's not great, moving on). I was able to get a point where my new server does indeed see that there's an existing database, but it keeps saying I have the wrong username/password and it won't let me reset the password even when I'm on the same network (no VPN, same subnet, etc, I can't possibly be any more on the same network). Am I doing something wrong? Did I miss a step? Or is this migration simply not possible? My main concern is keeping watching history/progress but it would also be nice if I can keep users and passwords so my friends/family using the server can just log in as if nothing happened.

Thanks in advance. Happy to share any logs or additional info, but I'm kind of a newb when it comes to server administration so you may need to tell me where they are.


RE: Migrating from Debian to Ubuntu - skribe - 2023-09-05

It should be that simple. Just copy the configuration and data directories and make sure that jellyfin has permission to access them. If that's not working, check to make sure that the files are actually copying correctly, and not getting corrupted in the migration process for one reason or another.


RE: Migrating from Debian to Ubuntu - Broom5229 - 2023-09-07

Okay the issue was solved. Somehow, no matter how many times I copied the original files from the old Debian server or how many different USB sticks I used, something somewhere was getting corrupted. I finally used scp and everything copied flawlessly. I'm gonna blame the old Debian server's hardware, which was a major reason I was wanting to migrate in the first place: old, unstable, low-powered. Thanks to those in the Matrix room who were able to help me figure that out. God damn that one was frustrating. It seemed like everything was copying so I never even suspected data corruption.


RE: Migrating from Debian to Ubuntu - pixel24 - 2023-09-07

This is interesting. I unfortunately didn't quite understand what the problem was with Debian. I ask because I currently run my JF on an Ubuntu server and would like to go the other way and move to Debian.

When the exams are over here :-)


RE: Migrating from Debian to Ubuntu - demuxer86 - 2023-09-07

Ubuntu is Debian....


RE: Migrating from Debian to Ubuntu - TheDreadPirate - 2023-09-07

Ubuntu is not simply a copy+paste of Debian with a skin. Canonical has made a lot of quality of life changes to Debian to make it more accessible. In addition to providing professional support and much longer LTS support for Enterprises and Pro users (Ubuntu Pro is free for personal use, up to 5 PCs).

Choosing Debian over Ubuntu boils down to how strong your FLOSS convictions are.


RE: Migrating from Debian to Ubuntu - TallNerd87 - 2024-12-29

(2023-09-07, 06:48 AM)pixel24 Wrote: This is interesting. I unfortunately didn't quite understand what the problem was with Debian. I ask because I currently run my JF on an Ubuntu server and would like to go the other way and move to Debian.

When the exams are over here :-)

I did what you are trying to (or have done) just now. I had some issues but was able to get it to work with the following:

Migrating Jellyfin apt install from Ubuntu to Debian:

The paths you need to copy are:
/var/lib/jellyfin
/etc/jellyfin

The issue is there are files that can only be read/copied by the root user, so the root user is needed on both systems to properly copy all of the files.

To enable root SSH (ubuntu/debian, I did this on my old server):
Edit the /etc/ssh/sshd_config file, there should be a line that reads:
PermitRootLogin [some statement, ie prohibit-password or yes]
That line needs to read:
PermitRootLogin yes

For me, there was just a # in front of it commenting out the line, so I removed the #.
Once /etc/ssh/sshd_config is edited and saved, you need to restart the ssh service:
sudo systemctl restart ssh

Now you can ssh into the root user on the old server. The steps I took are:
1. Installed jellyfin on the new server.
2. Stopped the jellyfin service on the new and old servers.
    a. sudo systemctl stop jellyfin
3. Enabled root ssh on the old server.
    a. See above instructions.
4. On the new server, ran the following:
    a. su -
        i. Enter root password
    b. rsync -a --info=progress2 root@[old_server]:/var/lib/jellyfin /var/lib
        i. -a does a bunch of things for rsync, but ultimately it saves the permissions and dates of all files
        ii. --info=progress2 just gives a nice readout of the progress
    c. rsync -a --info=progress2 root@[old_server]:/etc/jellyfin /etc
5. Started the jellyfin service on the new server.
    a. sudo systemctl start jellyfin
6. Access the new jellyfin service via the web interface and all of your users should be there.