Your homelab is running smoothly. You’ve got Nextcloud for files, Vaultwarden for passwords, Immich for photos, and a dozen other services humming along. But here’s the uncomfortable truth: if your server dies tomorrow, can you recover everything?
Most self-hosters only think about backups after disaster strikes. Don’t be one of them.
This guide covers everything you need to build a bulletproof backup strategy for your homelab — from understanding the 3-2-1 rule to implementing automated backups with tools like Restic, Borg, and rsync.
Why Homelab Backups Are Different
Commercial cloud services have redundant infrastructure, automated backups, and teams of engineers ensuring your data survives. Your homelab? That’s all on you.
Here’s what makes homelab backups unique:
- You’re responsible for everything — from strategy to execution to testing
- Cost matters — you can’t just throw money at the problem
- Complexity varies — from a single Docker host to multi-node Proxmox clusters
- Downtime is acceptable — you’re not Netflix; brief maintenance windows are fine
The good news? Modern backup tools are incredibly powerful, often free, and designed for exactly this use case.
The 3-2-1 Backup Rule (And Why It Matters)
Every backup strategy should follow the 3-2-1 rule:
- 3 copies of your data — the original plus two backups
- 2 different storage types — don’t put all eggs in one basket
- 1 copy offsite — protects against fire, theft, or catastrophic failure
Real-World Example
Let’s say you’re running Nextcloud:
- Original data — on your homelab server’s SSD
- Local backup — automated nightly backups to a second internal drive
- Offsite backup — weekly encrypted backups to Backblaze B2 or Wasabi
This protects you against:
- Drive failure (local backup saves you)
- Server death (local backup still accessible)
- House fire or theft (offsite backup is your lifeline)
What to Back Up
Not everything needs the same backup strategy. Categorize your data:
Critical Data (Daily backups, offsite copies)
- Configuration files (
docker-compose.yml,.envfiles) - Application databases (Nextcloud, Vaultwarden, etc.)
- User-generated content (documents, photos)
- Persistent volumes for Docker containers
Important Data (Weekly backups, local copies)
- Media libraries (if hard to replace)
- System configurations
- VM/CT snapshots
Replaceable Data (Optional backups)
- Downloaded media (if easily re-downloadable)
- Cache directories
- Temporary files
Pro tip: Start by backing up configuration files and databases. You can rebuild almost everything else from those.
Backup Tools Comparison
Let’s look at the most popular tools for homelab backups:
Restic — Best Overall
Pros:
- Encrypted, deduplicated, compressed backups
- Supports tons of backends (local, S3, B2, SFTP, etc.)
- Fast incremental backups
- Excellent documentation
- Single binary, easy to install
Cons:
- Repository needs periodic maintenance (
restic prune) - No native GUI (but web UIs exist)
Best for: Docker volumes, configuration files, databases
BorgBackup — Maximum Efficiency
Pros:
- Extremely efficient deduplication (better than Restic)
- Compression built-in
- Encrypted backups
- Stable and mature
Cons:
- More complex than Restic
- Limited cloud support (primarily SSH-based)
- Requires BorgBackup on remote server
Best for: Large datasets, when you control both ends
rsync — Simple and Reliable
Pros:
- Dead simple
- Fast incremental transfers
- Widely available
- Great for file-based backups
Cons:
- No deduplication
- No compression by default
- No encryption (use with SSH)
- Not space-efficient for versioned backups
Best for: Quick local mirrors, initial testing
Duplicati — GUI-Friendly
Pros:
- Web-based GUI
- Supports many cloud backends
- Encrypted, compressed backups
- Scheduling built-in
Cons:
- Slower than Restic/Borg
- Database corruption issues reported
- Less actively maintained
Best for: Users who prefer GUIs over command line
Practical Implementation: Restic Backups
Let’s build a real backup system using Restic and Docker. This example backs up Docker volumes to both local storage and Backblaze B2.
Step 1: Install Restic
| |
Step 2: Initialize Repositories
| |
Step 3: Create Backup Script
Create /usr/local/bin/backup-homelab.sh:
| |
Make it executable:
| |
Step 4: Automate with Cron
| |
Step 5: Test Your Backups
Always test your backups! Here’s how:
| |
Docker-Compose Backup Solution
For a containerized approach, here’s a complete docker-compose setup with automated backups:
| |
This setup:
- Runs backups daily at 2 AM
- Backs up application data and database volumes
- Automatically prunes old snapshots
- Sends encrypted backups to Backblaze B2
Database Backups (The Right Way)
Never back up database files directly while the database is running. Use proper dump tools:
PostgreSQL
| |
MySQL/MariaDB
| |
Add these to your Restic backup script or run them before your main backup.
Backing Up Docker Configurations
Your docker-compose.yml files and .env files are critical. Back them up separately:
| |
Even better, use Git:
| |
Offsite Backup Options
Cloud Storage
Backblaze B2 — $6/TB/month, free egress with Cloudflare
- Best for: Most homelabs
- Restic/Borg support: Excellent
- Cost: Very competitive
Wasabi — $6.99/TB/month, free egress
- Best for: Larger datasets
- Restic/Borg support: Excellent via S3 API
- Cost: Predictable, no egress fees
AWS S3 Glacier Deep Archive — $0.99/TB/month
- Best for: Rarely-accessed archives
- Restic/Borg support: Good
- Cost: Cheap storage, expensive retrieval
Self-Hosted Offsite
Parents’ house / friend’s server:
| |
VPS as backup target:
- Cheap VPS: ~$5/month for 100GB
- Install BorgBackup or set up SFTP
- Encrypt everything before sending
Testing Your Backups (Critical!)
A backup you haven’t tested is Schrödinger’s backup — it both exists and doesn’t exist until you verify it.
Monthly Backup Test Routine
List snapshots:
1restic snapshots --repo /mnt/backup/restic-repoRestore a random file:
1 2 3restic restore latest --repo /mnt/backup/restic-repo \ --target /tmp/restore-test \ --include /path/to/important/fileVerify database backups:
1gunzip < /mnt/backup/postgres-20260207.sql.gz | head -n 50Full recovery drill (quarterly):
- Spin up a test VM
- Restore from backup
- Verify all services start
- Check data integrity
Monitoring and Alerting
Set up notifications for backup failures:
Using Healthchecks.io
| |
Using Uptime Kuma
If you’re running Uptime Kuma (see our upcoming guide), add a Push monitor for your backup script.
Common Mistakes to Avoid
- Backing up to the same physical drive — if the drive dies, both original and backup are gone
- Never testing restores — you don’t have backups, you have backup attempts
- Ignoring encryption — offsite backups without encryption are a privacy nightmare
- Backing up while services are running — databases especially need proper dumps
- No monitoring — you won’t know backups are failing until you need them
- Keeping backups in the same location — fire/flood/theft takes everything
Your Backup Strategy Checklist
- Identified critical data (configs, databases, user data)
- Chosen backup tool (Restic recommended)
- Set up local backup repository
- Set up offsite backup repository
- Created automated backup scripts
- Configured cron/systemd timers
- Tested restore procedure
- Set up monitoring/alerts
- Documented recovery process
- Scheduled quarterly full recovery drills
Conclusion
Homelab backups aren’t optional. They’re the difference between a minor inconvenience and losing months or years of work.
Start simple:
- Back up your docker-compose files to Git (takes 5 minutes)
- Set up Restic for local backups (takes 30 minutes)
- Add offsite backups to Backblaze B2 (takes 15 minutes)
- Test a restore (takes 10 minutes)
One hour of work today saves you from devastating data loss tomorrow.
Your future self will thank you.
What’s your backup strategy? Are you using Restic, Borg, or something else? Let us know in the comments!
Next up: We’ll cover setting up Uptime Kuma for comprehensive homelab monitoring — including backup monitoring.