backup
Ansible role that can run restic backups and push it to a remote storage server.
yannick
README
Backup
Restic-based backup and restore for Docker Compose services across all hosts.
Key Parameters
| Variable | Default | Description |
|---|---|---|
backup_mode |
backup |
Operation mode: backup or restore |
backup_services |
[] (all) |
Comma-separated service names to target; empty = all discovered |
backup_hosts |
[] (all) |
Limit to specific hosts; empty = all docker_servers |
restic_repo |
rest:http://storage.home:8000/backup |
Restic repository URL |
restic_password |
(vault) | Repository encryption password |
restic_retention_args |
--keep-last 10 |
Retention policy passed to restic forget |
backup_health_check_timeout |
300 |
Seconds to wait for containers to become healthy after restart |
Workflow
- Install restic (if
backup_auto_install_resticis true) - Initialize restic repository (idempotent)
- Discover all Docker Compose services under
/docker/on target hosts - Stop each service's Compose stack
- Run
restic backupon the service directory (tagged by service name) - Prune old snapshots per retention policy
- Restart Compose stack
- Wait for health checks to pass
Repository Statistics
0
Stars
0
Forks
1
Watchers
0
Issues
Default Branch:main
Primary Language:Jinja
Created:August 23, 2025
Last Updated:March 18, 2026
Repository Size:0.05 KB