• 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 Jellyfin Backup

     
    • 0 Vote(s) - 0 Average

    Jellyfin Backup

    Dzvon2
    Offline

    Junior Member

    Posts: 20
    Threads: 8
    Joined: 2024 Apr
    Reputation: 0
    #1
    2024-05-14, 01:41 AM
    I am looking to upgrade to the newest Jellyfin version 10.9.1, and I see its recommended to take a full backup of Jellyfin before updating in case there are issues. I tried looking up online and found conflicting pieces of info about what is needed for a backup. I am using Ubuntu and wanted to know if anyone could share what directories I should be backing up? Thanks in advance.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-05-14, 01:41 PM (This post was last modified: 2024-05-14, 01:41 PM by TheDreadPirate. Edited 1 time in total.)
    Stop jellyfin and back up these directories.

    /var/lib/jellyfin
    /etc/jellyfin

    If anything goes wrong or you need to revert back to 10.8.13, restore these directories and, just for good measure, chown them.

    sudo chown -R jellyfin: /var/lib/jellyfin /etc/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
    cesar_bianchi
    Offline

    Junior Member

    Posts: 9
    Threads: 4
    Joined: 2023 Aug
    Reputation: 2
    Country:Brazil
    #3
    2024-08-09, 07:03 PM
    You can also apply an automatic backup routine over your Jellyfin instance.

    https://forum.jellyfin.org/t-automatic-r...n-instance
    34626
    Offline

    Member

    Posts: 172
    Threads: 36
    Joined: 2023 Jul
    Reputation: 0
    Country:Denmark
    #4
    2024-08-09, 08:17 PM
    I use the official jellyfin docker, very easy to maintain, especially when it comes to backup, restore and upgrade :-)
    Serv: N5105 - 32GB RAM, 1 WD Red SA500 2TB, 2 8TB, 2 4TB WD Red Plus, LC-35U3-C-HUB
    OS: Debian
    Clients: Pi4 with LibreELEC + JellyCon and Jellyfin Media Player
    Network: 2 TP-Link AX23, OpenWRT mesh 802.11s and 1 Gbit
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #5
    2024-08-09, 08:40 PM
    On my bare metal, non-docker, Jellyfin install I opted to write a short backup script and setup a cron. When the cron triggers, in the middle of the night when no one is using my Jellyfin, it runs the script, which stops jellyfin and then rsyncs any changes to a backup folder. Then I setup Duplicati to sync the backup directory to my Google Drive. Duplicati is configured to keep 30 days of backups, which are differentials so it isn't using up a huge amount of space.
    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
    alleycat
    Offline

    Member

    Posts: 69
    Threads: 19
    Joined: 2024 Sep
    Reputation: 0
    Country:United States
    #6
    2024-10-12, 04:35 PM
    (2024-08-09, 08:40 PM)TheDreadPirate Wrote: On my bare metal, non-docker, Jellyfin install I opted to write a short backup script and setup a cron. When the cron triggers, in the middle of the night when no one is using my Jellyfin, it runs the script, which stops jellyfin and then rsyncs any changes to a backup folder.  Then I setup Duplicati to sync the backup directory to my Google Drive.  Duplicati is configured to keep 30 days of backups, which are differentials so it isn't using up a huge amount of space.

    Would you be willing to share this script with us noobs? I've been worried about backing up. I would like to backup to TrueNAS Scale.
    This sounds like what I've been looking for...
    Jellyfin 10.10.7 (bare metal)
    Ubuntu 24.04.2 LTS, OS 1TB NVMe
    Dell OptiPlex 7050 Intel i7-6700 32GB ram
    Intel Arc A310 ELF
    Storage: TrueNas Mini R Raidz2 45 TiB (Samba shares)
    Gateway: PFsense/HAproxy

    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #7
    2024-10-13, 01:11 AM
    The way mine works is by writing to a temporary "backup" directory on my NVMe drive. This minimizes down time. Once the backup completes to the NVMe drive I start up my containers and then it starts writing the backup to the hard drive for storage.

    I use rsync because it has an option (--delete) to clean up files in the "destination" folder that are no longer present in the "source". This helps prevent the backup from bloating with files that no longer exist.

    Update the three path variables at the top with where your files are located.

    BACKUPDIR = the temp path you are moving files to. Preferably the path is on a fast SSD.
    DOCKERDIR = the root path for where all your docker data is located.
    STORAGEDIR = the path for permanent backup storage.

    Code:
    #!/bin/bash

    BACKUPDIR=/root/backup
    DOCKERDIR=/docker/containers
    STORAGEDIR=/media/library/backup

    mkdir -p $BACKUPDIR
    mkdir -p $BACKUPDIR/docker

    cd $DOCKERDIR
    docker compose down
    rsync -a -p --progress . $BACKUPDIR/docker/ --delete
    docker compose up -d

    mkdir -p $STORAGEDIR

    rsync -a -p --progress $BACKUPDIR/docker $STORAGEDIR --delete

    Then I have duplicati running as a service that pushes the storage backup folder to Google Drive.

    My containers, not just jellyfin, are down for about 5-7 seconds since rsync essentially does a "diff" backup. The initial backup will take longer.
    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]
    alleycat
    Offline

    Member

    Posts: 69
    Threads: 19
    Joined: 2024 Sep
    Reputation: 0
    Country:United States
    #8
    2024-10-13, 03:40 AM (This post was last modified: 2024-10-13, 04:13 AM by alleycat. Edited 3 times in total.)
    (2024-10-13, 01:11 AM)TheDreadPirate Wrote: The way mine works is by writing to a temporary "backup" directory on my NVMe drive.  This minimizes down time.  Once the backup completes to the NVMe drive I start up my containers and then it starts writing the backup to the hard drive for storage.

    I use rsync because it has an option (--delete) to clean up files in the "destination" folder that are no longer present in the "source".  This helps prevent the backup from bloating with files that no longer exist.

    Update the three path variables at the top with where your files are located.

    BACKUPDIR = the temp path you are moving files to.  Preferably the path is on a fast SSD.
    DOCKERDIR = the root path for where all your docker data is located.
    STORAGEDIR = the path for permanent backup storage.

    Code:
    #!/bin/bash

    BACKUPDIR=/root/backup
    DOCKERDIR=/docker/containers
    STORAGEDIR=/media/library/backup

    mkdir -p $BACKUPDIR
    mkdir -p $BACKUPDIR/docker

    cd $DOCKERDIR
    docker compose down
    rsync -a -p --progress . $BACKUPDIR/docker/ --delete
    docker compose up -d

    mkdir -p $STORAGEDIR

    rsync -a -p --progress $BACKUPDIR/docker $STORAGEDIR --delete

    Then I have duplicati running as a service that pushes the storage backup folder to Google Drive.

    My containers, not just jellyfin, are down for about 5-7 seconds since rsync essentially does a "diff" backup.  The initial backup will take longer.

    I thank you for the reply and script example. My standalone Jellyfin server (Dell 7050) runs Ubuntu 24.04 (bare metal) and I installed the Jellyfin repo straight to it, thats the only software on this machine. I don't think I'm running Docker or Flatpacks on the Dell. I was hoping to rsync Jellyfin data from the Dell to a dataset on my Truenas Mini X+, which is another machine.

    This is how I installed Jellyfin from the docs:
    curl https:// repo.jellyfin.org/install-debuntu.sh | sudo bash
    Jellyfin 10.10.7 (bare metal)
    Ubuntu 24.04.2 LTS, OS 1TB NVMe
    Dell OptiPlex 7050 Intel i7-6700 32GB ram
    Intel Arc A310 ELF
    Storage: TrueNas Mini R Raidz2 45 TiB (Samba shares)
    Gateway: PFsense/HAproxy

    « 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