fix: schedule weekly full postgres backup
Some checks failed
CI / test (pull_request) Failing after 4m45s
CI / deploy (pull_request) Has been skipped

This commit is contained in:
2026-09-15 18:45:27 +03:00
parent 5c3883beca
commit 384cd550d5
6 changed files with 37 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
#!/bin/sh
set -eu
temporary=$(mktemp)
trap 'rm -f -- "$temporary"' EXIT HUP INT TERM
crontab -l 2>/dev/null | grep -v 'postgres-backup.sh' > "$temporary" || true
printf '%s\n' '30 3 * * 0 flock -n /tmp/miem-postgres-backup.lock /srv/miem_workers/infra/postgres-backup.sh >/dev/null 2>&1' >> "$temporary"
crontab "$temporary"