How one can monitor znapzend?

Yes, I am aware it produces logs, but logs are pretty extensive and reading them through when you are backing up many filesystems is not convenient at all.

Ideally: some nagios plugin which informs there are repeating problems, or a similar extension.

You may compare the existing snapshots on your destination server and on the source. If the number of snapshots are equal and the dates are the same I would say that the last backup should have been successful. Edit: The script I use to check daily backups myself. Written on bourne shell and working fine on FreeBSD, but as per POSIX standard should work on any other OS. May be you will need to play around with the filter for the remote snapshots, this one works for me but this is for specific hostnames and zfs datasets.

#!/bin/sh

dist_server='192.168.10.37'

local_snapshots="$(zfs list -t snapshot | grep -v auto | grep -i `date +"%Y-%m-%d"` | wc -l|tr -d ' ')"
remote_snapshots="$(ssh root@$dist_server 'zfs list -t snapshot |grep -i remote-dataset-name |grep -i `date +"%Y-%m-%d"`' | wc -l |tr -d ' ')"



#echo local_snapshots=$local_snapshots

#echo remote_snapshots=$remote_snapshots


if [ "$local_snapshots" == 0 ]; then
    echo "Backup failed! $local_snapshots were created today."
    exit 2
else

    if [ "$local_snapshots" == "$remote_snapshots" ]; then
        echo "Backup succeess, today $local_snapshots was transferred"
        exit 0
    else
        echo "Backup failed! $local_snapshots snapshots were created but $remote_snapshtos were transferred"
        exit 2
    fi
fi

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.