Backrest is a modern web-based UI and orchestrator for restic backup. It provides scheduled backups, monitoring, and easy restore functionality with support for local and cloud storage.
- Web-based UI: Easy-to-use interface for managing backups
- Scheduled Backups: Cron-based scheduling for automated backups
- Multiple Repositories: Support for multiple backup destinations
- Cloud Storage: S3, B2, Azure, Google Cloud, and more
- Restic Backend: Proven, secure, and efficient backup engine
- Monitoring: Real-time backup status and notifications
- Easy Restore: Browse and restore files from any snapshot
- Docker-based: Simple deployment with Docker Compose
- Automatic HTTPS: Traefik integration with Let's Encrypt
| Feature | Backrest | Traditional Restic | Duplicati |
|---|---|---|---|
| Web UI | ✅ Modern | ❌ CLI only | ✅ Yes |
| Scheduling | ✅ Built-in | ✅ Built-in | |
| Monitoring | ✅ Real-time | ❌ Manual | ✅ Yes |
| Restic Backend | ✅ Yes | ✅ Yes | ❌ Own format |
| Cloud Support | ✅ Extensive | ✅ Yes | ✅ Limited |
| Docker Native | ✅ Yes | ✅ Yes | |
| Setup Complexity | Very Simple | Complex | Medium |
- Docker and Docker Compose installed
- Traefik reverse proxy running on
dim_network_traefiknetwork - Domain pointing to your server (e.g.,
backrest.do-it.media) - Backup storage location (local disk, NAS, or cloud storage)
cd /opt/docker_backrestcp .env.example .env
nano .envConfigure the following values:
# Domain Configuration
BACKREST_DOMAIN=backrest.do-it.media
# Timezone
TZ=Europe/Berlin
# Local Backup Storage Path
BACKUP_STORAGE_PATH=/mnt/backupssudo mkdir -p /mnt/backups
sudo chown -R dimdev:dimdev /mnt/backupsOr mount your NAS/external drive to /mnt/backups.
./init-backrest.shOpen your browser and navigate to:
https://backrest.do-it.media
-
Click "Add Repository"
-
Repository Name:
local-backups -
Repository Type: Choose one:
- Local: File system path
- S3: Amazon S3 or compatible
- B2: Backblaze B2
- Azure: Azure Blob Storage
- GCS: Google Cloud Storage
- SFTP: Remote server via SSH
-
For Local Storage:
- Path:
/backups/repo1 - Password: Generate strong password (save this!)
- Path:
-
Click "Initialize Repository"
-
Click "Add Plan"
-
Plan Name:
daily-docker-backup -
Repository: Select
local-backups -
Paths to Backup: Add paths from mounted volumes:
/backup-sources/opt/docker_vaultwarden /backup-sources/opt/docker_psono /backup-sources/opt/docker_passbolt -
Schedule: Cron expression
- Daily at 2 AM:
0 2 * * * - Every 6 hours:
0 */6 * * * - Weekly on Sunday:
0 2 * * 0
- Daily at 2 AM:
-
Retention Policy:
- Keep last 7 daily backups
- Keep last 4 weekly backups
- Keep last 12 monthly backups
-
Click "Save Plan"
- Find your backup plan
- Click "Run Now"
- Monitor progress in the UI
- Go to "Snapshots" tab
- Select a snapshot
- Click "Browse" to view files
- Test restore by downloading a file
┌─────────────────┐
│ Traefik │
│ Reverse Proxy │
└────────┬────────┘
│ HTTPS (Let's Encrypt)
│
┌────┴──────────┐
│ Backrest │
│ Web UI │
│ (Port 9898) │
└───────┬───────┘
│
┌───────┴───────────────────┐
│ │
┌───▼──────────┐ ┌─────────▼────────┐
│ Backup │ │ Backup │
│ Sources │ │ Destinations │
│ (mounted) │ │ (repositories) │
└──────────────┘ └──────────────────┘
│ │
├─ /opt ├─ Local: /backups
├─ Docker volumes ├─ S3: s3.amazonaws.com
└─ Custom paths ├─ B2: b2.backblaze.com
└─ SFTP: remote-server
- Image:
garethgeorge/backrest:latest - Purpose: Web UI and backup orchestrator for restic
- Port: 9898 (internal only)
- Volumes:
backrest_data: Config and backup metadatabackrest_cache: Restic cache for performance/opt: Backup source (read-only)/var/lib/docker/volumes: Docker volumes (read-only)BACKUP_STORAGE_PATH: Local backup destination
Edit docker-compose.yml to add/modify backup sources:
volumes:
# Add your custom paths here
- /home:/backup-sources/home:ro
- /etc:/backup-sources/etc:ro
- /var/www:/backup-sources/var-www:ro# Add to .env
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_DEFAULT_REGION=us-east-1In Backrest UI:
- Repository Type: S3
- Endpoint:
s3.amazonaws.com - Bucket:
your-bucket-name - Path:
/backups/server1
# Add to .env
B2_ACCOUNT_ID=your_account_id
B2_ACCOUNT_KEY=your_account_keyIn Backrest UI:
- Repository Type: B2
- Bucket:
your-bucket-name - Path:
/backups/server1
# Add to .env
GOOGLE_PROJECT_ID=your_project_id
GOOGLE_APPLICATION_CREDENTIALS=/config/gcs-credentials.jsonCopy service account JSON to container:
docker cp credentials.json backrest:/config/gcs-credentials.jsonConfigure email notifications in Backrest UI:
- Go to Settings
- Click "Notifications"
- Add SMTP configuration:
- Host:
mail.do-it.media - Port:
587 - Username:
backrest@do-it.media - Password: Your SMTP password
- From:
backrest@do-it.media
- Host:
- Set notification triggers:
- On backup failure
- On backup success (optional)
# Real-time logs
docker compose logs -f backrest
# Last 100 lines
docker compose logs --tail=100 backrestdocker compose restart backrestdocker compose downdocker compose pull
docker compose up -ddocker exec -it backrest sh# List snapshots
docker exec backrest restic -r /backups/repo1 snapshots
# Check repository
docker exec backrest restic -r /backups/repo1 check
# Show repository stats
docker exec backrest restic -r /backups/repo1 stats# Backup config
docker cp backrest:/data/config.json ./backrest-config-backup.json
# Restore config
docker cp ./backrest-config-backup.json backrest:/data/config.json
docker compose restart backrest- 3 copies of your data
- 2 different storage types
- 1 offsite backup
Example Implementation:
- Primary: Original data on server
- Local Backup:
/mnt/backupson local NAS - Cloud Backup: Backblaze B2 or AWS S3
Daily backups: Keep last 7 days
Weekly backups: Keep last 4 weeks
Monthly backups: Keep last 12 months
Yearly backups: Keep last 3 years
Configure in Backrest UI under Plan → Retention.
Essential:
- Docker volumes:
/var/lib/docker/volumes - Application configs:
/opt/docker_* - Databases: Export dumps before backup
- User data:
/home
Optional:
- System configs:
/etc - Web server data:
/var/www - Logs:
/var/log(if needed)
Exclude:
- Temporary files:
/tmp,/var/tmp - Cache:
/var/cache - System binaries:
/bin,/sbin,/usr
For databases, export dumps before backing up:
# Vaultwarden database
docker exec vaultwarden_db pg_dump -U vaultwarden vaultwarden > /mnt/backups/dumps/vaultwarden.sql
# Schedule with cron
0 1 * * * docker exec vaultwarden_db pg_dump -U vaultwarden vaultwarden > /mnt/backups/dumps/vaultwarden-$(date +\%Y\%m\%d).sqlAdd /mnt/backups/dumps to Backrest backup plan.
- Go to Snapshots tab
- Select snapshot date
- Click Browse
- Navigate to file
- Click Download or Restore
Via Backrest UI:
- Select snapshot
- Select directory
- Click Restore to Original Location or Custom Location
Via CLI:
docker exec -e RESTIC_PASSWORD=your_password backrest \
restic -r /backups/repo1 restore latest \
--target /restore \
--include /backup-sources/opt/docker_vaultwardenComplete system restore:
- Install fresh system
- Install Docker and Backrest
- Configure repository (same password!)
- Browse snapshots to verify
- Restore data to original locations
- Start services and verify
-
Repository Passwords:
- Use strong, unique passwords
- Store in password manager
- Never commit to Git
-
Encryption:
- Restic encrypts all backups by default
- Encryption keys derived from repository password
-
Access Control:
- Use Traefik basic auth for additional security
- Limit access by IP if possible
- Use strong passwords
-
Regular Testing:
- Test restore procedures monthly
- Verify backup integrity
- Check notification alerts
-
Offsite Backups:
- Always maintain cloud/offsite copy
- Different location from primary data
- Protected from local disasters
Container runs as root but may need access to protected files:
# Check file permissions
ls -la /path/to/backup/source
# Fix permissions if needed (be careful!)
sudo chmod -R +r /path/to/backup/source# Unlock repository
docker exec -e RESTIC_PASSWORD=your_password backrest \
restic -r /backups/repo1 unlock- Increase cache size: More disk space for restic cache
- Exclude unnecessary files: Add exclusions in backup plan
- Use compression: Enable in repository settings
- Network bandwidth: Check if using cloud storage
- Check if container is running:
docker ps | grep backrest- Check container logs:
docker compose logs backrest- Verify Traefik is running:
docker ps | grep traefik- Check DNS resolution:
nslookup backrest.do-it.media- Check repository password: Must match original
- Verify snapshot exists: Check snapshots tab
- Check disk space: Ensure enough space for restore
- Check permissions: Restore location must be writable
Larger cache improves performance:
# In docker-compose.yml
environment:
RESTIC_CACHE_SIZE: "4096" # MBFor cloud storage:
environment:
RESTIC_PARALLEL: "4" # Number of parallel uploadsEnable in repository settings for smaller backups (trades CPU for storage).
- Dashboard: View all plans and last run status
- Snapshots: Verify recent backups exist
- Logs: Review backup logs for errors
- Notifications: Configure email alerts
Backrest can export metrics for monitoring:
# Add to docker-compose.yml
environment:
BACKREST_PROMETHEUS_ENABLED: "true"
BACKREST_PROMETHEUS_PORT: "9090"For issues with:
- Backrest: GitHub Issues
- Restic: Restic Forum
- This setup: Check logs and troubleshooting section above
Backrest is open-source software. Check the GitHub repository for license details.
Remember: Test your backups regularly. A backup you can't restore is useless!