-
-
Notifications
You must be signed in to change notification settings - Fork 63
Monitoring
Edwin Eefting edited this page Jan 7, 2022
·
2 revisions
On completion, zfs-autobackup returns an exit code:
-
0
: Everything went fine, no important errors. -
x
: Snapshotting was ok, but there arex
datasets that aborted with a fatal error. -
255
: Wrong options or other major failure, probably nothing succeeded.
Without --verbose
or --debug
, zfs-autobackup only echos (zfs) errors and warnings to stderr. Complete silence means everything is fine.
So if you stick it in a crontab it should only mail you if something is wrong.
If it detects a tty it will output progress updates to stdout.
You can monitor backups by using my zabbix-jobs script. (https://github.com/psy0rz/stuff/tree/master/zabbix-jobs)
Put this command directly after the zfs_backup command in your cronjob:
zabbix-job-status backup_smartos01_fs1 daily $?
This will update the zabbix server with the exit code and will also alert you if the job didn't run for more than 2 days.
Sponsored by: JetBrains
zfs-autobackup:
- Introduction (README.md)
- Getting started
- Full manual
- Mounting backup datasets
- Performance tips (recommended)
- Common problems and errors
- Thinning out obsolete snapshots
- Common snapshot and holds
- Handling ZFS encryption
- Transfer buffering, compression and rate limiting.
- Custom Pre- and post-snapshot commands
- Monitoring
Examples: