2024-07-28, 12:36 AM
Here is what I did to backup and restore my Jellyfin completely.
NOT putting a slash at the end of the SOURCE path is important. Without the slash rsync will pull the entire directory, including hidden files and folders. If you put a /* at the end of the source path it would not grab hidden folders and files.
To simulate a fresh OS install
To reinstall
To restore
None of my clients had to re-login.
Code:
mkdir -p /path/to/backup/drive/jellyfin
cd /path/to/backup/drive/jellyfin
mkdir jellyfinEtc jellyfinVar jellyfinCache
sudo rsync -a -p --progress /etc/jellyfin jellyfinEtc/
sudo rsync -a -p --progress /var/lib/jellyfin jellyfinVar/
sudo rsync -a -p --progress /var/cache/jellyfin jellyfinCache/
NOT putting a slash at the end of the SOURCE path is important. Without the slash rsync will pull the entire directory, including hidden files and folders. If you put a /* at the end of the source path it would not grab hidden folders and files.
To simulate a fresh OS install
Code:
sudo apt purge jellyfin*
To reinstall
Code:
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash
To restore
Code:
sudo systemctl stop jellyfin
cd /etc
sudo rsync -a -p --progress /path/to/backup/drive/jellyfin/jellyfinEtc/jellyfin .
cd /var/lib
sudo rsync -a -p --progress /path/to/backup/drive/jellyfin/jellyfinVar/jellyfin .
cd /var/cache
sudo rsync -a -p --progress /path/to/backup/drive/jellyfin/jellyfinCache/jellyfin .
sudo chown -R jellyfin /var/lib/jellyfin /var/cache/jellyfin /etc/jellyfin
sudo systemctl start jellyfin
None of my clients had to re-login.