briven-backup.service22 lines · main
1[Unit]
2Description=briven.tech — daily pg_dump of briven_control + briven_data to MinIO
3Documentation=https://code.konnos.org/flndrn/briven/src/branch/main/infra/backups
4Requires=docker.service
5After=docker.service network-online.target
6Wants=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.
12OnFailure=briven-backup-alert.service
13
14[Service]
15Type=oneshot
16ExecStart=/usr/local/bin/briven-backup.sh
17StandardOutput=journal
18StandardError=journal
19# Generous timeout — a full dump is seconds today but can grow.
20TimeoutStartSec=1h
21# Don't restart on failure; the timer fires again tomorrow.
22# Journal tells us if a run failed.