Jellyfin Forum
How to backup Jellyfin on Ubuntu Server? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: How to backup Jellyfin on Ubuntu Server? (/t-how-to-backup-jellyfin-on-ubuntu-server)



How to backup Jellyfin on Ubuntu Server? - WeHaveDebris - 2023-10-28

Good morning,
I am running Jellyfin 10.8.11 on Ubuntu Server 22.04.3. I am brand new to Jellyfin but can hold my own in Ubuntu, with enough Googling. 

However I have found something I've not yet been able to answer, which brings me here. I need to make sure I can backup my Jellyfin configuration, data, anything that might be needed in case I have to restore my Jellyfin environment to a fresh install. (I understand the built-in database goes corrupt when it's windy outside, but in any case it's always prudent to have backups)

I'm referencing the server paths listed in https://jellyfin.org/docs/general/administration/configuration, and https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html for the standards. 

My intention is to back up data and configuration. I'm not launching using command line options, I don't seem to have Jellyfin environment variables specified (checked with printenv and grep'ped), and I'm not launching in Windows. So that leaves me to option(s) 4 (and 5). 

$XDG_DATA_HOME/jellyfin, if $XDG_DATA_HOME exists
$HOME/.local/share/jellyfin

and

$XDG_CONFIG_HOME/jellyfin if $XDG_CONFIG_HOME exists
$HOME/.config/jellyfin


This is where I get stuck; I don't have any directory .local or .config in my home folder, and the Jellyfin user doesn't have a home dir. 

Please excuse my ignorance, I feel like it ought to be obvious but I'm really not sure what to look at next. I really appreciate any guidance. I'd like to understand why none of the paths in the documentation match what I'm seeing in practice. I don't yet have my full media library in, but I have the top-level folders configured and most of my personalizations set, so there should be enough there to backup. I need to ensure that my backups work and are tested before I put Jellyfin into production. 

Thanks,
Dusty


RE: How to backup Jellyfin on Ubuntu Server? - TheDreadPirate - 2023-10-28

Bare metal Ubuntu installs put all your data in /var/lib/jellyfin and all your configs in /etc/jellyfin.


RE: How to backup Jellyfin on Ubuntu Server? - WeHaveDebris - 2023-10-28

I've found them! That's just what I needed... many thanks for taking the time to help me out!


RE: How to backup Jellyfin on Ubuntu Server? - Soused19 - 2024-11-25

Hello @TheDreadPirate,

I would like to move my Jellyfin server (Ubuntu) to new one (probably Debian), with more local space (4x12TB RAID5).

My idea is to move only the users and their data what they have already seen.
I would like the libraries and metadata about the files to be generated again. Is there a way to achieve this and what to transfer from the existing Jellyfin server?

Thanks


RE: How to backup Jellyfin on Ubuntu Server? - TheDreadPirate - 2024-11-25

You should migrate everything in /etc/jellyfin and only the "data" folder in /var/lib/jellyfin.


RE: How to backup Jellyfin on Ubuntu Server? - Soused19 - 2024-11-25

Super, thx.


RE: How to backup Jellyfin on Ubuntu Server? - 8r7f - 2025-03-08

Does copying /etc/jellyfin and /var/lib/jellyfin to a new computer require that the paths to media folders is the same on the new machine?


RE: How to backup Jellyfin on Ubuntu Server? - TheDreadPirate - 2025-03-09

(2025-03-08, 04:04 AM)8r7f Wrote: Does copying /etc/jellyfin and /var/lib/jellyfin to a new computer require that the paths to media folders is the same on the new machine?

Yes.  You should ensure that your media paths are setup identically PRIOR to starting your migrated/restored Jellyfin on the new system.  Otherwise Jellyfin will notice that the media isn't present and clear out your metadata.