backup
Ansible role that can run restic backups and push it to a remote storage server.
1.2 KB•MD
README.md
1.2 KB • 27 lines • markdown
1# Backup
2
3Restic-based backup and restore for Docker Compose services across all hosts.
4
5## Key Parameters
6
7| Variable | Default | Description |
8|----------|---------|-------------|
9| `backup_mode` | `backup` | Operation mode: `backup` or `restore` |
10| `backup_services` | `[]` (all) | Comma-separated service names to target; empty = all discovered |
11| `backup_hosts` | `[]` (all) | Limit to specific hosts; empty = all `docker_servers` |
12| `restic_repo` | `rest:http://storage.home:8000/backup` | Restic repository URL |
13| `restic_password` | (vault) | Repository encryption password |
14| `restic_retention_args` | `--keep-last 10` | Retention policy passed to `restic forget` |
15| `backup_health_check_timeout` | `300` | Seconds to wait for containers to become healthy after restart |
16
17## Workflow
18
191. Install restic (if `backup_auto_install_restic` is true)
202. Initialize restic repository (idempotent)
213. Discover all Docker Compose services under `/docker/` on target hosts
224. Stop each service's Compose stack
235. Run `restic backup` on the service directory (tagged by service name)
246. Prune old snapshots per retention policy
257. Restart Compose stack
268. Wait for health checks to pass
27