Monitor restic and Borg backups
A successful backup process is not proof that a usable backup exists. The command can exit zero while the repository holds no recent snapshot, the output file is empty, or the scheduled job stopped running entirely.
backupctl wraps the command, reports start and completion, and runs a
backend-specific verification before reporting success.
restic
Section titled “restic”The restic adapter runs restic snapshots --json after the wrapped backup and
rejects success when the newest snapshot is older than --max-age:
export RESTIC_REPOSITORY='s3:s3.example.com/backups/production'export RESTIC_PASSWORD_FILE=/root/.config/restic/passwordexport BACKPULSE_URL=https://backpulse.aniicrite.devexport BACKPULSE_PING_KEY='<check-key>'
backupctl run --adapter restic --max-age 26h -- \ restic backup /srv/data --tag dailyA nightly cron entry:
30 3 * * * BACKPULSE_URL=https://backpulse.aniicrite.dev BACKPULSE_PING_KEY=<check-key> /usr/local/bin/backupctl run --adapter restic --max-age 26h -- restic backup /srv/data --tag dailyUse the generic artifact checks for an exported archive or manifest. Thecommand must exit zero, the file must exist, be recent, and exceed the minimumsize:
```shbackupctl run \ --path /var/backups/borg/latest-manifest.json \ --max-age 26h \ --min-size 128 \ -- /usr/local/sbin/run-borg-backupIf the Borg script already runs borg check, keep it inside the wrapped
command so a failed integrity check reports failure:
backupctl run -- /bin/sh -c \ 'borg create --stats ::daily-{now} /srv/data && borg check --verify-data --last 1'Failure signals
Section titled “Failure signals”- No
/startbefore the expected time: the scheduler or host failed. /startwithout completion: the process is stuck or the host disappeared./fail: the command or result verification failed.- A late completion: the job exceeded its normal window.
- Duplicate starts: overlapping schedules or retries running the job twice.
The backup command remains authoritative. A backpulse network failure only warns — it never turns a successful backup into a failed one.