This is a way to do an automated cloud backup of your Jellyfin database using TrueNAS Cloud Sync Tasks. Requires Jellyfin 10.10 or above.
- Create a PUSH+SYNC task and selected your prefered cloud remote
- Select
/<jellyfin-dataset>/data/backupsas source - Add a pre-script to create the backup
curl -H "Content-Type: application/json" \ -d '{"Database":true,"Metadata":false,"Trickplay":false,"Subtitles":false}' \ "http://<jellyfin-server>/Backup/Create?ApiKey=<jellyfin-token>"
- Add a post-script to remove the backup (this could be modified to keep X backups)
rm -f /<jellyfin-dataset>/data/backups/*