# Monitor PostgreSQL backups (pg_dump) with HookPulse

End the pg_dump line in the crontab with one curl. HookPulse alerts you when the nightly dump stops or fails.

HookPulse · Updated 2026-10-14

## Step 1. Create the monitor

Add a routine named postgres-backup and set how often the job runs. Its page shows the check-in URL: use it in place of https://hookpulse.net/in/YOUR_ID.

## Step 2. Add the check-in to the dump line

Run crontab -e. pg_dump -Fc writes one compressed file, and $? sends its exit status: 0 is a success. In a crontab, % starts a new line, so the date uses \%.

```sh
# m h dom mon dow  command
0 3 * * * pg_dump -Fc -f /backups/app-$(date +\%F).dump app; curl -fsS -m 10 --retry 3 "https://hookpulse.net/in/YOUR_ID/$?"
```

## Step 3. Run it once

Run pg_dump once by hand with the same options. The routine shows the first check-in. From then on, a missed or failed run sends the alert.

[Create the monitor](https://hookpulse.net/?routine=postgres-backup&every=86400#routines)

[Monitor PostgreSQL backups (pg_dump) with HookPulse](https://hookpulse.net/guides/postgresql-backup)
