Backups & maintenance

The moment a backup breaks.

Chain an alert onto pg_dump, rsync, restic, or any backup command. A failure pushes to your phone the moment it breaks, and a daily success ping confirms the rest still ran.

Fires on failureDaily success pingpg_dump · rsync · restic
Features

Trust your backups again

A backup you never verify is a gamble. Turn silent failures into alerts and prove every run.

Catch silent failures

A failed backup pushes to your phone right when it breaks, weeks before an empty restore would.

Confirm it ran

A success ping on each run proves the job still works. When it stops arriving, you know it died.

See the reason

Pipe stderr into the message. The alert then shows you why pg_dump, rsync, or restic failed.

Any backup tool

pg_dump, mysqldump, rsync, restic, borg, and tar all trigger on their exit code.

A channel that fits

Send failures and routine success pings to separate applications, so the urgent ones never hide behind the noise.

One line to add

One line chained onto the backup script you already run. No agent, no dashboard, no maintenance window.

Get started

Three steps to backup peace of mind

1

Get the CLI or key

Install the PocketAlert CLI and run pocketalert auth, or grab your API key for a plain curl call.

2

Wrap your backup

Chain pocketalert send onto your backup command: || for failures, && for success.

3

Sleep easy

Failures push the moment they break. Success pings prove the job still runs.

Protect your backup job

Install and authenticate the CLI

sudo mv pocketalert /usr/local/bin/ && chmod +x /usr/local/bin/pocketalert
pocketalert auth YOUR_API_KEY

Alert when a database dump fails

Chain with || so the alert fires only on a non-zero exit code:

pg_dump mydb | gzip > /backups/mydb.sql.gz || pocketalert send \
  -t "Backup failed: mydb" -m "pg_dump exited non-zero"

restic, with the last lines of the error log

restic backup /data 2>/tmp/restic.err \
  && pocketalert send -t "Backup OK: data" -m "restic done $(date)" \
  || pocketalert send -t "Backup failed: data" -m "$(tail -n 3 /tmp/restic.err)"

borg or rsync, scheduled in cron

0 3 * * * borg create /repo::'data-{now}' /data \
  && pocketalert send -t "Backup OK: data" \
  || pocketalert send -t "Backup failed: data"

No CLI? Call the API with curl

rsync -a /data /backup || curl -X POST "https://api.pocketalert.app/v1/messages" \
  -H "Token: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Backup failed: rsync","message":"rsync exited non-zero","level":"critical"}'

The docs cover targeting a specific application or device.

FAQ

Questions, answered

Chain a notification onto your backup command. With `||`, a failure sends a push notification to your phone right away, days before the restore that would have caught it.

Yes, and that is where the real value sits. Send a success ping with `&&` on every run. When the daily "Backup OK" stops arriving, you know the job quietly stopped working.

Capture stderr and put it in the message. The CLI pipes the last lines of the error log into the alert, so you can see why pg_dump or rsync failed.

Anything you script can trigger an alert on its exit code: pg_dump, mysqldump, rsync, restic, borg, Duplicati, tar jobs, and managed snapshot scripts.

Send failures and success pings to different applications. Failures land in a channel you watch closely, while the daily "Backup OK" sits in a quiet one that stays auditable.

Yes. Add `level=critical` to the failure branch and Android posts it on a channel that bypasses Do Not Disturb, while iPhone shows it as a time-sensitive notification that breaks through Focus. Send the daily "Backup OK" with `level=silent` and it lands in history without a sound.

Stop trusting backups you never check.

Add one line to your backup script. A silent failure becomes an alert you actually see.