Commit Graph

7 Commits

Author SHA1 Message Date
Mike Reeves 84197fb33b Move postgres backup script and cron to the postgres states
The so-postgres-backup script and its cron were living under
salt/backup/config_backup.sls, which meant the backup script and cron
were deployed independently of whether postgres was enabled/disabled.

- Relocate salt/backup/tools/sbin/so-postgres-backup to
  salt/postgres/tools/sbin/so-postgres-backup so the existing
  postgres_sbin file.recurse in postgres/config.sls picks it up with
  everything else — no separate file.managed needed.
- Remove postgres_backup_script and so_postgres_backup from
  salt/backup/config_backup.sls.
- Add cron.present for so_postgres_backup to salt/postgres/enabled.sls
  and the matching cron.absent to salt/postgres/disabled.sls so the
  cron follows the container's lifecycle.
2026-04-21 09:42:41 -04:00
Mike Reeves 61bdfb1a4b Add daily PostgreSQL database backup
- pg_dumpall piped through gzip, stored in /nsm/backup/
- Runs daily at 00:05 (4 minutes after config backup)
- 7-day retention matching existing config backup policy
- Skips gracefully if container isn't running
2026-04-09 10:29:10 -04:00
m0duspwnens 1047462898 add identifiers for all cron.present 2023-04-13 16:25:47 -04:00
Mike Reeves 3156b1ed0c Re-Work Backups 2023-03-15 17:53:14 -04:00
m0duspwnens 95f7cb6bcd change file_mode to mode 2022-10-12 14:21:55 -04:00
m0duspwnens 6a17f201a2 changes for backup state 2022-10-12 11:31:42 -04:00
m0duspwnens b526532ab6 use global vars in states 2022-10-11 11:57:15 -04:00