• 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 Development Feature Requests Jellyfin Backups & Migration

     
    • 2 Vote(s) - 5 Average

    Jellyfin Backups & Migration

    LeviSnoot
    Offline

    Junior Member

    Posts: 20
    Threads: 3
    Joined: 2023 Sep
    Reputation: 1
    Country:Sweden
    #1
    2023-09-19, 01:15 PM
    Basing this thread off the following Fider request: https://features.jellyfin.org/posts/1603...nd-restore

    I'm sure this feature is being actively developed still, so I want to add my 2¢ to the discussion.

    What I'd like to see in the backup/restore feature is the following:
    • A simple GUI for creating and restoring backups.
    • A "restore" button in the Web UI setup wizard that comes up on first launch. That way we won't have to configure the server just to restore it right after.
    • Backups should be platform agnostic, so they can be restored from any system.
    • Library database items shouldn't be linked to a full file path since this can change in a migration. Give the user an option to define the new library paths on restore, and use a variable for the file paths based on that in the database.
    • MariaDB option.
    • Backup as a scheduled task so it can run regularly.

    It's definitely no small task to get all of this worked out, but it will definitely give users more peace of mind that their server is safe. Feel free to further contribute to the discussion of the feature in this thread!
    JF Server Specs:
    • CPU: Intel Core i5-11400
    • Motherboard: ASRock H510M-ITX/ac
    • RAM: G.Skill 16GB (2x8GB) Value 2666MHz CL19 DDR4
    • PSU: Silverstone SX300-B 80+ Bronze SFX
    • OS: Debian 12
    • JF: 10.10.6
    3
    1
    1
    1
    Fabri91
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2023 Sep
    Reputation: 0
    Country:Italy
    #2
    2023-09-22, 07:07 AM
    I agree that this feature would be very useful - at a bare minimum an easier way to backup and restore an "already watched" list would make migrating significantly easier.
    1
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #3
    2023-09-22, 12:36 PM
    You can achieve, effectively, the same thing by backing up the jellyfin and library database files.
    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]
    LeviSnoot
    Offline

    Junior Member

    Posts: 20
    Threads: 3
    Joined: 2023 Sep
    Reputation: 1
    Country:Sweden
    #4
    2023-10-22, 07:45 PM
    TheDreadPirate dateline='[url=tel:1695386170' Wrote: 1695386170[/url]']
    You can achieve, effectively, the same thing by backing up the jellyfin and library database files.

    I believe this only works if the base file paths for library items is identical on restore, which may not always be the case.
    JF Server Specs:
    • CPU: Intel Core i5-11400
    • Motherboard: ASRock H510M-ITX/ac
    • RAM: G.Skill 16GB (2x8GB) Value 2666MHz CL19 DDR4
    • PSU: Silverstone SX300-B 80+ Bronze SFX
    • OS: Debian 12
    • JF: 10.10.6
    Marco2G
    Offline

    Junior Member

    Posts: 16
    Threads: 4
    Joined: 2023 Dec
    Reputation: 0
    Country:Switzerland
    #5
    2023-12-26, 09:54 AM
    I have to agree with the others, the way proposed by TheDreadPirate isn't satisfactory... I have tried this at one point and failed utterly. I was trying to move from an apt installed Jellyfin to docker and I could not get this to work, despite users on reddit helping me out and me trying to correct paths in the files manually.

    There absolutely needs to be a way to move the database in an installation type agnostic way.
    cesar_bianchi
    Offline

    Junior Member

    Posts: 9
    Threads: 4
    Joined: 2023 Aug
    Reputation: 2
    Country:Brazil
    #6
    2024-08-09, 07:10 PM
    Hy Guys

    To help some users who are looking for a automatic jellyfin backup solution, I written a post with a suggest solution

    It was written for Linux instances, but it's so simple change for another platforms kind.

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

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2025 Mar
    Reputation: 0
    #7
    2025-03-06, 02:40 PM
    Hi guys,

    I've created a script that does a backup to a cloud location using rclone.
    with crontab you can automate it. I used it on Ubuntu Server.
    I run the script as root to need have any rights issues.

    #!/bin/bash

    # Variables
    BACKUP_DIRS=("/var/lib/jellyfin" "/etc/jellyfin")  # Directories to back up
    DEST_DIR="/mnt/data/backup-temp"  # Local temp storage for ZIPs
    ONEDRIVE_FOLDER="Backup/Jellyfin"  # Folder name in OneDrive
    MAX_BACKUPS=3  # Maximum number of backups to keep
    JELLYFIN_SERVICE="jellyfin"  # Jellyfin service name

    # Timestamp format YYYYMMDD_HHMMSS
    TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
    ZIP_FILE="$DEST_DIR/Jellyfin_backup_$TIMESTAMP.zip"

    # Ensure destination directory exists
    mkdir -p "$DEST_DIR"

    # Stop Jellyfin before backup
    echo "Stopping Jellyfin service..."
    sudo systemctl stop "$JELLYFIN_SERVICE"

    # Create a ZIP archive
    echo "Creating backup archive..."
    if zip -r "$ZIP_FILE" "${BACKUP_DIRS[@]}"; then
        echo "Backup created successfully: $ZIP_FILE"
    else
        echo "Backup creation failed!"
        sudo systemctl start "$JELLYFIN_SERVICE"
        exit 1
    fi

    # Start Jellyfin after backup
    echo "Starting Jellyfin service..."
    sudo systemctl start "$JELLYFIN_SERVICE"

    # Upload to OneDrive using rclone
    export RCLONE_CONFIG=/home/tim/.config/rclone/rclone.conf
    echo "Uploading backup to OneDrive..."
    if rclone copy "$ZIP_FILE" onedrive:"$ONEDRIVE_FOLDER" --progress; then
        echo "Upload successful."
        rm "$ZIP_FILE"  # Remove local ZIP after upload
    else
        echo "Upload failed!"
        exit 1
    fi

    # Delete oldest backups if more than $MAX_BACKUPS exist
    echo "Checking for old backups to delete..."
    BACKUPS_ON_ONEDRIVE=$(rclone lsf onedrive:"$ONEDRIVE_FOLDER" | sort | head -n -$MAX_BACKUPS)

    for FILE in $BACKUPS_ON_ONEDRIVE; do
        echo "Deleting old backup: $FILE"
        rclone delete onedrive:"$ONEDRIVE_FOLDER/$FILE"
    done
    1
    enesha
    Offline

    Junior Member

    Posts: 49
    Threads: 12
    Joined: 2023 Nov
    Reputation: 1
    Country:United Kingdom
    #8
    2025-03-08, 02:20 PM
    (2023-09-22, 12:36 PM)TheDreadPirate Wrote: You can achieve, effectively, the same thing by backing up the jellyfin and library database files.

    Effectively, yes you can apparently do that.  This does not allow EASY backup and restore, nor does it provide flexibility. (see my note in another forum wanting to import the viewed state of my library) .  It requires more than standard user ability.  The ability to export and import (perhaps choosing which tables to import...Maybe users, but not access or whatever...Up to the admin.

    I am sure I don't know the work involved with such a thing.  The programming here is next to magic in my opinion, so I can't say it would be easy, but it's better than the admins and users needing to know the ins and out of the installs on the various platforms...where is the windows data, where is the docker data, where is it in *nix....

    You can make certain assumptions (not really correct necess. these days) regarding capability of users/admins in win/mac/*nix/docker based on where they are from, but that's the pointy of asking for a unified experience Smiling-face
    Intel Core i7-7800X CPU @ 4.00GHz
    64G RAM
    MultiDrive UnRaid server (JF in VM)
    ~100TB Total, approx 50%
    BookWorm
    1
    « Next Oldest | Next Newest »

    Users browsing this thread: 2 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