Backup¶
HomelabARR CE includes backup.sh for backing up all container application data. Regular backups are the difference between a minor inconvenience and starting from scratch.
What Gets Backed Up¶
The backup script targets /opt/appdata — the directory where all container configs, databases, and application state are stored. Each app gets its own compressed archive.
Note
The script skips Traefik (trae), Authelia (auth), and Cloudflare (cf) containers during backup. Back those up separately (see below).
Running a Backup¶
sudo ./backup.sh
The script:
- Prunes unused Docker images to free space
- Pulls the latest
ghcr.io/smashingtags/homelabarr-backupimage - Iterates through all running containers (except Traefik/Authelia/cf-companion)
- Creates a
.tar.gzarchive per container in/mnt/downloads/appbackups/local/ - Sets ownership to
1000:1000on each archive - Prunes Docker images again after completion
Backup Output¶
Each container gets its own archive:
/mnt/downloads/appbackups/local/sonarr.tar.gz
/mnt/downloads/appbackups/local/radarr.tar.gz
/mnt/downloads/appbackups/local/plex.tar.gz
...
What to Back Up Manually¶
The backup script covers appdata, but you should also preserve:
Environment Config¶
cp .env .env.backup
cp apps/.config/.env apps/.config/.env.backup
These contain your domain, Cloudflare credentials, and all deployment variables. Losing these means reconfiguring everything.
Traefik Config¶
tar czf traefik-backup.tar.gz /opt/appdata/traefik/
Key files: - /opt/appdata/traefik/rules/ — middleware definitions - /opt/appdata/traefik/acme/acme.json — SSL certificates - /opt/appdata/traefik/traefik.log — logs (optional)
Authelia Config¶
tar czf authelia-backup.tar.gz /opt/appdata/authelia/
Key files: - /opt/appdata/authelia/configuration.yml — Authelia settings - /opt/appdata/authelia/users_database.yml — user accounts and hashed passwords
Warning
If you lose users_database.yml, you'll need to recreate all user accounts and passwords.
Docker Volumes¶
Some containers use named Docker volumes instead of bind mounts. List them:
docker volume ls
Back up a specific volume:
docker run --rm -v volume_name:/data -v /opt/backup:/backup alpine \
tar czf /backup/volume_name.tar.gz -C /data .
Recommended Strategy¶
| Frequency | What | How |
|---|---|---|
| Daily | Appdata (backup.sh) | Cron job or manual |
| Weekly | Full system snapshot | Proxmox PBS, VM snapshot, or disk image |
| After changes | .env files, Traefik/Authelia configs | Manual copy |
| Monthly | Off-site copy | rsync to remote server or cloud storage |
Automating with Cron¶
# Run backup daily at 3 AM
sudo crontab -e
# Add:
0 3 * * * /path/to/homelabarr-ce/backup.sh >> /var/log/homelabarr-backup.log 2>&1
Proxmox Users
If HomelabARR CE runs in a Proxmox VM or LXC, use Proxmox Backup Server (PBS) for automated VM-level snapshots. This gives you bare-metal recovery in addition to app-level backups.
Verifying Backups¶
Periodically verify your backups are usable:
# List contents of a backup archive
tar tzf /mnt/downloads/appbackups/local/sonarr.tar.gz | head -20
# Test extraction to a temp directory
mkdir /tmp/backup-test
tar xzf /mnt/downloads/appbackups/local/sonarr.tar.gz -C /tmp/backup-test
ls /tmp/backup-test
rm -rf /tmp/backup-test
Support¶
Kindly report any issues/broken-parts/bugs on github or discord