• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support General Questions migrate jellyfin

     
    • 0 Vote(s) - 0 Average

    migrate jellyfin

    how to migrate jellyfin from test to "production" system
    wimmmy
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Aug
    Reputation: 0
    Country:United States
    #1
    2024-10-09, 08:43 PM
    New member.
    I've searched the forums using "migrate", "backup", "restore", etc; even browsed thru the entire "Guides and Walkthrus".  
    Saw a couple suggestions to only copy /etc/jellyfin and /var/lib/jellyfin and that should do it.  It does not do it'
    Been using jellyfin for a few years.
    Used to just make changes directly on my server, but now, after messing up a couple times, I am trying to stage on my laptop and then move the media/data to the server.
    Problem is, it just doesn't work.
    I do this on test machine: 
    1. stop/disable jellyfin service on both systems 
    2. "sudo tar -cf jel.tar jel.tar /var/lib/jellyfin /var/cache/jellyfin /etc/jellyfin /usr/lib/jellyfin" on test system (also tried without the cache)
    2a. also tried this:  "sudo tar -cvf jel.tar /var/lib/jellyfin /var/cache/jellyfin /etc/jellyfin /usr/lib/jellyfin ~/.local/share/jellyfin  jellyfin ~/.config/jellyfin"
    3. copy jel.tar to main system
    4.  log in to main system, "cd /"; "sudo tar -xf ~/jel.tar"

    Then restart jellyfin on main system, and get the screen asking for a server name.  I delete that server and then restart and get the wizard.

    Apparently there is some other "magic" file that I am missing.
    Perhaps, somewhere jellyfin knows it is on a different system.

    I am on Linux Mint 21.3.  Same file structure and userids on both systems.

    I have used Jellyman, which puts everything in /opt/jellyfin and also provides a backup mechanism, altho never tried to migrate it to different system.
    Maybe will bring it back  and try it out again.

    Anyone successfully able to migrate/copy to separate machine.

    Thank you for any assist

    Jimmy
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-10-09, 09:36 PM
    I have migrated or restored 3 times. One hardware failure induced restoration from backup, one migration when upgrading hardware and clean installing 24.04, one restoration when I borked the OS after not installing a custom kernel incorrectly.

    My backup and restoration method is similar, but I preferred to do it a less consolidated. Here is a summary, but not exactly, how it worked before I switched to docker.

    Code:
    sudo systemctl stop jellyfin
    cd /some/backup/directory
    mkdir etcJellyfin libJellyfin cacheJellyfin
    rsync -a -p --progress /etc/jellyfin etcJellyfin/
    rsync -a -p --progress /var/lib/jellyfin libJellyfin/
    rsync -a -p --progress /var/cache/jellyfin cacheJellyfin/
    tar cfz jellyfinBackup.tgz

    And to restore, after installing jellyfin via apt.

    Code:
    sudo systemctl stop jellyfin
    cd /some/backup/directory
    mv ~/jellyfinBackup.tgz .
    tar xfz jellyfinBackup.tgz
    cd /etc/
    rsync -a -p --progress /some/backup/directory/etcJellyfin .
    cd /var/lib
    rsync -a -p --progress /some/backup/directory/libJellyfin .
    cd /var/cache
    rsync -a -p --progress /some/backup/directory/cacheJellyfin .

    I know you said that both systems have the same UIDs for Jellyfin, but I always ensure that it wasn't changed at some point in the process.

    Code:
    sudo chown -R jellyfin: /var/lib/jellyfin /var/cache/jellyfin /etc/jellyfin
    sudo systemctl start jellyfin
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    wimmmy
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Aug
    Reputation: 0
    Country:United States
    #3
    2024-10-13, 04:16 PM
    I dunno. Actually, my uid is not the same on both systems, but did a chown on target, Still no da.
    I am still getting the wizard.
    on target sys: sudo systemctl stop jellyfin
    untar the directories that were tarred on source system: /var/lib/jellyfin /var/cache/jellyfin /etc/jellyfin
    then: sudo chown -R jellyfin: /var/lib/jellyfin /var/cache/jellyfin /etc/jellyfin
    restart and still the wizard

    I see a file /var/lib/jellyfin/device.txt = 40eea15a153347aba1075848f0e28c1e
    Wonder if this is tying it to a specific system.

    Spotted "jellyfin migrator" on git - gonna try that next.
    madsepperl
    Offline

    Junior Member

    Posts: 12
    Threads: 0
    Joined: 2024 Aug
    Reputation: 0
    Country:Germany
    #4
    2024-10-14, 06:46 PM
    I just followed the steps from thedreadpirate (thanks, man!) and it worked perfectly for me to completely move the jellyfin installation from one server to another.

    Just a few changes/remarks:

    the rsync commands to restore are missing a / at the end of the source directory
    I deleted the jellyfin directories on the new server before doing the restore:

    Code:
    cd /etc/
    rm -r jellyfin
    rsync -a -p --progress /some/backup/directory/etcJellyfin/ .
    wimmmy
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Aug
    Reputation: 0
    Country:United States
    #5
    2024-10-20, 04:52 PM
    I give up. Way too much trouble with these files spread all over the filesystem.
    Found this: https://github.com/Smiley-McSmiles/jellyman
    Made a few modifications to it to totally isolate all of jellyfin to /opt/jellyfin. S
    rsync to other system, copy jellyfin.service to it's rightful place.
    Voila, migrated and works.

    Thanks for all

    Jimmy
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode