Backups

It's a good idea to back up your Jellyfin on a regular basis so you can restore should something happen. The following locations must be backed up:

  1. /etc/jellyfin = Web settings and users.

  2. /var/lib/jellyfin = The core data. The largest portion and can be several gigabytes in size.

  3. /var/cache/jellyfin = Image caches.

Before restoring, If Jellyfin is not installed, please install it again. Once installed, stop the service: systemctl stop jellyfin.service

Automatic Backups

Déjà Dup comes packaged with Ubuntu and simply named "Backups" from the application window. An alternative is to use Back In Time. This is what I use. You can install it via Terminal with the command apt-get install backintime-qt4. Back In Time can restore permissions and owners.

Manual Backups

Use an elevated Files (sudo nautilus) to place your files back and set permissions.

Jellyfin Web

The jellyfin folder is owned by jellyfin:adm with permissions 750

chown jellyfin:adm /etc/jellyfin && chmod 750 /etc/jellyfin

The contents of the jellyfin folder is unique and uses a different owner on one file.

find /etc/jellyfin -type f -print0 | xargs -0 chown -R jellyfin:jellyfin && chmod -R 644
​
find /etc/jellyfin -type d -print0 | xargs -0 chown -R jellyfin:jellyfin && chmod -R 755
​
chown jellyfin:root /etc/jellyfin/logging.json

Jellyfin Database

The jellyfin folder is owned by jellyfin:adm with permissions 750

chown jellyfin:adm /var/lib/jellyfin && chmod 750 /var/lib/jellyfin

The contents of the jellyfin folder is owned by jellyfin

find /etc/jellyfin -type f -print0 | xargs -0 chown -R jellyfin:jellyfin && chmod -R 644
​
find /etc/jellyfin -type d -print0 | xargs -0 chown -R jellyfin:jellyfin && chmod -R 755

Jellyfin Caches

The jellyfin folder is owned by jellyfin:www-data with permissions 775

chown jellyfin:www-data /var/lib/jellyfin && chmod 775 /var/lib/jellyfin

The contents of the jellyfin folder is unique and uses a different owner and permission on one folder.

chown -R jellyfin:www-data /var/cache/jellyfin && chmod -R 775 /var/cache/jellyfin
​
chown -R jellyfin:jellyfin /var/cache/jellyfin/temp && chmod -R 755 /var/cache/jellyfin/temp