Unraid's parity protects against drive failure. It does not protect against fire, theft, ransomware, or the occasional accidentally-running rm -rf. Here is how to back up Unraid shares and appdata to an encrypted offsite vault using Restic in a Docker container.
Unraid's parity gives a lot of people a false sense of security. Parity is not a backup. It is a resilience mechanism against hardware failure of one or two drives. Everything parity protects against can happen again at a bigger scale, and everything parity does not protect against - most threats, honestly - has no mitigation inside Unraid itself.
Specifically, parity does not help with:
An offsite backup costs a small amount per month. Losing everything on a 40TB Unraid because of one of the above costs anywhere from hundreds of hours to uninsurable amounts of data.
Unraid runs Docker natively. The cleanest offsite backup setup uses an official Restic container, pointed at your shares (read-only) and your /mnt/user/appdata, with the repository target pointing at an SFTP vault.
Install Community Applications first if you haven't. Then install a Restic container. A minimal working setup:
# Container configuration
Image: restic/restic:latest
Network: host
# Volumes
/mnt/user:/source:ro
/mnt/user/appdata:/appdata:ro
/mnt/user/system/restic-cache:/cache
# Environment variables
RESTIC_REPOSITORY=sftp:vaultuser@vault.servercrate.net:22150:/data
RESTIC_PASSWORD=your-repository-password
RESTIC_CACHE_DIR=/cache
# Command (set per-run, not as a default)
backup /source/critical-share /source/other-share /appdata --tag unraid-$(hostname)
The :ro on the source mounts is important. Your backup container should never be able to write to your data; it only reads.
Install the User Scripts plugin from Community Applications. Create a new script for nightly backup:
#!/bin/bash
# /boot/config/plugins/user.scripts/scripts/nightly-backup/script
# Stop key containers first so their data is consistent
docker stop nextcloud mariadb home-assistant
# Run backup
docker run --rm \
--network host \
-v /mnt/user:/source:ro \
-v /mnt/user/appdata:/appdata:ro \
-v /mnt/user/system/restic-cache:/cache \
-e RESTIC_REPOSITORY="sftp:vaultuser@vault.servercrate.net:22150:/data" \
-e RESTIC_PASSWORD="your-repository-password" \
-e RESTIC_CACHE_DIR="/cache" \
restic/restic:latest \
backup /source/Documents /source/Photos /appdata \
--tag unraid-nightly
# Restart containers
docker start home-assistant mariadb nextcloud
# Weekly: prune old snapshots
if [ "$(date +%u)" = "7" ]; then
docker run --rm \
-v /mnt/user/system/restic-cache:/cache \
-e RESTIC_REPOSITORY="sftp:vaultuser@vault.servercrate.net:22150:/data" \
-e RESTIC_PASSWORD="your-repository-password" \
-e RESTIC_CACHE_DIR="/cache" \
restic/restic:latest \
forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune
fi
Set the schedule in User Scripts to 0 2 * * * (2am daily) and you have a working nightly backup.
Good candidates:
Skip:
Backing up a running database usually corrupts the backup. Options for appdata, in order of quality:
mysqldump, pg_dump, Nextcloud's occ maintenance:mode. Back up the dump alongside the raw files.For 99% of home setups, option 1 is fine. Nextcloud, Home Assistant, qBittorrent, Plex - none of them mind a 10-second stop/start nightly. Calendar the restart window for 3am when nobody is using them.
Your Unraid Docker appdata is the glue that holds your entire setup together. Real example of what is often in there:
Losing a single TB media share is annoying. Losing appdata means a month of rebuilding and still ending up with something that is not quite right. Prioritize appdata in your backup.
A real ransomware incident on Unraid typically looks like: SMB share exposed without enough isolation, attacker gets into Windows client, crypts all shares the Windows user can write to. Your Unraid parity happily stores the encrypted files.
Offsite Restic backup with snapshot history defeats this. The encrypted "ransomed" files get backed up as a new snapshot. Yesterday's snapshot still has the original files. You restore from yesterday, wipe the affected Windows machine, and keep moving.
To make this work, two things matter:
Your Unraid USB flash drive holds the config. If it dies and you have no backup, you have to rebuild from scratch. Use Unraid's built-in Settings → Flash Backup which uploads a backup to Community Applications' service, and separately back up /boot via your Restic job for a second independent copy.
Once you have a ServerCrate vault, the credentials go straight into your Restic environment:
RESTIC_REPOSITORY=sftp:vaultuser@vault.servercrate.net:22150:/data
RESTIC_PASSWORD=your-repository-password
ServerCrate gives you SFTP-native storage backed by ZFS with zero-knowledge encryption. Your Unraid encrypts with Restic before anything leaves the box. The ServerCrate side cannot read your backups regardless of what happens on our end.
10GB free. Restic in a Docker container. Encrypted before it leaves your server. No egress fees.
No egress fees, cancel anytime, 7-day money-back guarantee