briven-backup.service 997 B

12345678910111213141516171819202122
  1. [Unit]
  2. Description=briven.tech — daily DoltGres-native backup (all DBs, gentle/throttled) + pg_dump secondary + off-site mirror
  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. [Service]
  14. Type=oneshot
  15. ExecStart=/usr/local/bin/briven-backup.sh
  16. StandardOutput=journal
  17. StandardError=journal
  18. # Generous timeout — a full dump is seconds today but can grow.
  19. TimeoutStartSec=1h
  20. # Don't restart on failure; the timer fires again tomorrow.
  21. # Journal tells us if a run failed.