briven-backup.service22 lines · main
| 1 | [Unit] |
| 2 | Description=briven.tech — daily pg_dump of briven_control + briven_data to MinIO |
| 3 | Documentation=https://code.konnos.org/flndrn/briven/src/branch/main/infra/backups |
| 4 | Requires=docker.service |
| 5 | After=docker.service network-online.target |
| 6 | Wants=network-online.target |
| 7 | # Fire briven-backup-alert.service whenever this unit exits non-zero. The |
| 8 | # script exits 1 when an off-site upload fails (the local pg_dump still |
| 9 | # succeeded, but the off-site copy didn't land). The alert unit reads |
| 10 | # /run/briven-backup-status and posts a Discord message to #briven-alerts |
| 11 | # so an operator notices within the 60s SLA from road-to-ga.md §0.2. |
| 12 | OnFailure=briven-backup-alert.service |
| 13 | |
| 14 | [Service] |
| 15 | Type=oneshot |
| 16 | ExecStart=/usr/local/bin/briven-backup.sh |
| 17 | StandardOutput=journal |
| 18 | StandardError=journal |
| 19 | # Generous timeout — a full dump is seconds today but can grow. |
| 20 | TimeoutStartSec=1h |
| 21 | # Don't restart on failure; the timer fires again tomorrow. |
| 22 | # Journal tells us if a run failed. |