Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Nagios to monitor servers, and we use rsnapshot for backups. I'd like a plugin for Nagios that monitors that rsnapshot is being run successfully. I've seen some rsnapshot plugins that will do a whole diff on a directory tree, which is way too inefficent for me.

Are there any that do some simple checks that the last run went OK (ie looking at log files) or that all the directories are there?

share|improve this question
rory - dont be affraid to roll your own plugin. i do it all the time. you just put simple logic inside bash/pearl script and return exit code 0 - if all is fine or 1 / 2 if it's warning / critical. keep in mind to make plugin quick - not more then 10sec afiar by default. leave heavy lifting for some cron jobs. – pQd Jun 19 '09 at 15:26
up vote 2 down vote accepted

i cannot really answer about rsnapshot but i use rdiff - similar tool.

there is couple of things i monitor with nagios for my backups:

  • what was exit code of last rdiff run. if it's not 0 - it means that something went wrong in the process. i just have simple bash script that executes bacup and depending on result touches file ok or failed. with nagios i check freshness of OK file and alert if it's older then 25h.
  • before running backup i touch file in /xyz/touched . on server that receives the backup i check freshness of that file. if it's older then 25h it means last night backup did not arrived to the receiving machine.
  • rdiff has verify option. i dont know if rsnapshot has. verify takes lot of time, i run it once a day and put result to a file... then simple nagios plugin greps this log file in search for error messages.

in this way i protect myself against interrupted backups and against file system corruption on receiving server ( for files not modified for long time ).

the trick is not to let nagios plugin do heavy lifting ( eg verifying the whole backup ), but rather schedule cron job that does that and have nagios plugin just checking result of the job ( eg file created or content of log file ).

and by the way - check this out.

share|improve this answer
I tried that plugin but it didn't work for me cause the backup was to an rsync server (ie I was backing up a remote server onto localhost) Thanks for the tips about what to look out for in a nagios plugin. I might have to write my own. – Rory Jun 19 '09 at 15:22

Rory, we have just released a plugin that should work for you. See the check_rsnapshot.php file in the nagios-tools package as well as documentation here.

This plugin will verify rsnapshot backups using a number of optional checks:

  • minfiles - checks the number of files in a snapshot against a minimum expected number;
  • minsize - checks the size of a snapshot against a minimum expected size; log - parses the rsnapshot log to ensure the most recent runs for each retention period completed successfully;
  • timestamp - checks for files created server side containing a timestamp and thus ensuring snapshots are succeedin;
  • rotation - checks that retention directories are being rotated; and
  • dir-creation - checks that retention directories are being created.
share|improve this answer
Or it would have helped back in 2009 when you posted the question :( – Barry O'Donovan Sep 28 '12 at 15:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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