Jellyfin Forum
Can't Backup Jellyfin - 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: Can't Backup Jellyfin (/t-can-t-backup-jellyfin)



Can't Backup Jellyfin - Hics - 2025-04-17

Last night when I was trying to backup Jellyfin I ran into this error message: 

"Could not read /var/lib/jellyfin/.aspnet/DataProtection-Keys/key-*random string of letters and numbers*.xml"

I didn't include the exact random string of letters and numbers in case it has something to do with security. I've backed up Jellyfin multiple times in the last few years without running into this issue. Any idea how to fix it or if the .aspnet folder even needs to be backed up? 

Thanks!


RE: Can't Backup Jellyfin - TheDreadPirate - 2025-04-17

Depending on how you're doing backups, its possible this file existed when the contents of /var/lib/jellyfin were enumerated but was no longer present when the backup went to actually copy the file.

Additionally, this implies you are backing up Jellyfin while it is running. 99% of the time this is probably ok, but we do recommend you shutdown Jellyfin during a backup to ensure that database commits are, at least, written to the database WAL/SHM files.

If you happen to capture the database while a commit was pending in memory or mid-commit, the resulting restore may be corrupt.

You can use rsync to do differential backups, which would massively cut down on backup times. My daily backups are quick enough that clients have enough buffer to not notice the disruption. Usually under 20 seconds from initiating shutdown to becoming fully available again. Though I run the backup in the middle of the night to ensure this goes unnoticed.