Skip to content

backup failure notifier via healthchecks.io (opt-in) - #15

Merged
erick-ti merged 1 commit into
mainfrom
feat-backup-healthcheck-ping
May 29, 2026
Merged

backup failure notifier via healthchecks.io (opt-in)#15
erick-ti merged 1 commit into
mainfrom
feat-backup-healthcheck-ping

Conversation

@erick-ti

Copy link
Copy Markdown
Owner

scripts/backup_db.sh's failure modes were silent — a stuck docker daemon, a credentialed-out R2 token, or a missed cron tick just sat in backup.log until tailed. The script now pings a healthchecks.io-style URL on /start (after pre-flight), the bare URL on success (after the off-box block, if any), and /fail via an EXIT trap when BACKUP_HEALTHCHECK_URL is set (default off, backwards-compatible like BACKUP_REMOTE) — a passive dead-man's switch, so the service alerts on both code-level failures and total no-shows where nothing pings at all. curl errors are non-fatal so a notifier outage can't fail an otherwise-good backup, and the URL is treated as a credential that never lands in logs. 7 new offline tests + a DEPLOY.md §9.2 setup walkthrough; offline suite 255 passed / 40 skipped.

ping a healthchecks.io-style URL on /start (after pre-flight), success
(bare URL, after the off-box block), and /fail (via an EXIT trap) when
BACKUP_HEALTHCHECK_URL is set — default-off, backwards-compatible like
BACKUP_REMOTE. passive dead-man's switch: the service alerts on both
code-level failures and total no-shows (cron didn't fire / box is off).
curl errors are non-fatal so a notifier outage can't fail a good backup,
and the URL is treated as a credential — never echoed to logs.

7 offline tests + DEPLOY.md §9.2 setup walkthrough.
@erick-ti
erick-ti merged commit f62b468 into main May 29, 2026
9 checks passed
@erick-ti
erick-ti deleted the feat-backup-healthcheck-ping branch May 29, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant