• 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

    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    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]
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    Jellyfin Backup - by Dzvon2 - 2024-05-14, 01:41 AM
    RE: Jellyfin Backup - by TheDreadPirate - 2024-05-14, 01:41 PM
    RE: Jellyfin Backup - by cesar_bianchi - 2024-08-09, 07:03 PM
    RE: Jellyfin Backup - by 34626 - 2024-08-09, 08:17 PM
    RE: Jellyfin Backup - by TheDreadPirate - 2024-08-09, 08:40 PM
    RE: Jellyfin Backup - by alleycat - 2024-10-12, 04:35 PM
    RE: Jellyfin Backup - by TheDreadPirate - 2024-10-13, 01:11 AM
    RE: Jellyfin Backup - by alleycat - 2024-10-13, 03:40 AM

    • 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