Guides · Backups · dumps · offsite sync

Know if a nightly backup never finished

A backup that never starts cannot attach a log. Heartbeat after a successful dump or sync. If tonight’s ping never arrives, Gonewatch emails you — Slack, Discord, or Telegram on paid plans.

How it works

  1. 1

    One monitor per backup

    Database dump, file sync, and offsite copy are separate jobs. Each gets its own URL and expected time.

  2. 2

    Ping only on success

    Chain the curl after pg_dump, restic, or rclone so a failed copy does not look healthy.

  3. 3

    Alert on a quiet night

    No heartbeat inside the grace window means Down. The next successful backup sends recovery.

After a successful dump

Same pattern as cron: the ping is the last step, not the first. Create a fixed-time monitor that matches when the backup should finish.

#!/usr/bin/env bash
set -euo pipefail
pg_dump "$DATABASE_URL" | gzip > /backups/app-$(date +%F).sql.gz
curl -fsS -X POST https://www.gonewatch.com/api/heartbeat/YOUR_TOKEN \
  -H "Content-Type: application/json" \
  -d '{"duration_ms":184320,"bytes":2147483648,"tables":42}'

Replace YOUR_TOKEN with the URL from the monitor page after you sign up. Treat it like a secret.

Silence is the failure

What this catches

Disk full, credentials expired, the dump host rebooted, or a cron that stopped calling the script.

What this is not

Gonewatch does not store the backup file or verify restore. Optional JSON (duration, size) is charted on the monitor. It only knows the job reported success on time.

Backup monitoring questions

What the heartbeat covers — and what it does not.

What if the dump fails but the server is still up?

Only ping after a successful exit. A failed pg_dump or rclone copy should skip the curl. Gonewatch then treats the missing heartbeat as Down.

Can I watch more than one backup?

Yes. One monitor per job — database dump, file sync, and offsite copy each get their own URL and schedule.

Do I need to send the backup file to Gonewatch?

No. Only a POST that the job finished. Optional JSON (duration, size) is stored on the monitor and charted in your plan history window. Do not send the backup file.

More guides

Watch tonight's backup

Free plan, email on down and recovery. No agent on the box.

Create a monitor