Markus Michalski FAQ

restic-backup-suite: Monitoring

Monitoring restic-backup-suite: success marker file, log files and exit codes. There are no built-in email or webhook notifications.

Deutsche Version

Back to overview


Monitoring

restic-backup-suite sends no notifications itself (no email, no webhook). For monitoring there is the marker file, the log files and the exit code.

Success marker

After a successful run, backup.sh writes an ISO 8601 timestamp (seconds, with time zone) to the file SUCCESS_MARKER_FILE. Default: /var/backup/.last_restic_success.

An external tool checks the file's age against your backup interval. Example for daily backups:

find /var/backup/.last_restic_success -mmin +1440 | grep -q . && echo CRITICAL || echo OK

A stale marker means either the backup failed or the marker could not be written. The log tells you which.

The marker confirms that restic backup succeeded. It says nothing about whether all database dumps worked, see Database dumps.

Log files

Script File
backup.sh <LOG_DIR>/backup-YYYY-MM-DD.log
restore.sh <LOG_DIR>/restore-YYYY-MM-DD.log
inspect.sh <LOG_DIR>/inspect-YYYY-MM-DD.log
Cron job (output) /var/log/restic/cron.log
tail -100 /var/log/restic/backup-$(date +%Y-%m-%d).log

Exit codes

Code Meaning
0 Run successful
non-zero (usually 1) Error: configuration missing, not root, restic missing, SFTP test or repository init failed, restic backup failed, unknown option

Warnings do not change the exit code: a failed retention step, an integrity check with findings, a service that fails to start, an unwritable marker and failed database dumps in a regular backup run.