Files
securityonion/salt
Mike Reeves 244a73b7a2 Make so-postgres-backup fail-safe against silent corruption
The dump pipeline returned gzip's exit status, so a pg_dumpall that
died mid-stream still produced a valid .gz holding a truncated dump,
written straight to the final filename. The idempotency check then
blocked retries for the day and the corrupt file counted toward
retention, evicting a good backup each day until none remained.

- set -o pipefail so a failed pg_dumpall fails the pipeline
- dump to a .tmp file and atomically rename only after success, so
  the final filename appears only for a complete backup
- gzip -t integrity check before publishing
- trap-based cleanup of the temp file; sweep stale temps at startup
- run retention only after a successful backup, with a glob
  restricted to finished backups
- log timestamped OK/ERROR outcomes to /opt/so/log/postgres/backup.log
2026-05-15 08:48:54 -04:00
..
2025-05-30 12:50:59 -04:00
2025-12-02 11:16:08 -06:00
2025-12-11 17:30:06 -05:00
2025-12-02 11:16:08 -06:00
2026-03-23 16:26:56 -04:00
2026-04-09 10:18:36 -04:00
2026-04-24 13:56:35 -04:00
2025-10-30 11:02:36 -04:00
2026-03-06 15:45:36 -05:00
2026-05-11 16:51:38 -05:00
2024-07-09 10:06:16 -04:00
2026-05-05 14:26:04 -04:00
2026-03-19 14:39:10 -04:00
2026-05-05 14:26:04 -04:00
2026-03-19 14:41:49 -04:00
2026-01-07 14:14:57 -05:00
2026-03-23 14:04:48 -05:00
2025-10-14 11:03:00 -04:00
2025-08-04 15:25:26 -04:00