BackupPC-users

[BackupPC-users] A nagios script for checking existance of backed up shares

2012-05-09 09:19:57
Subject: [BackupPC-users] A nagios script for checking existance of backed up shares
From: Alexander Kolodziej <alexander.kolodziej AT tactel DOT se>
To: backuppc-users AT lists.sourceforge DOT net
Date: Wed, 09 May 2012 15:01:21 +0200
Hello!

When i first installed BackupPC i tried to define a "BackupFilesOnly"
directory in
a share that i knew did not exist, just to see if it would show up as an
error.
I was a little surprsed when it went through just fine. (XfetMethod
rsync/ssh).

When i run rsync manually with a source directory that doesnt exist, it
complains,
so i dont know how this qualifies as a successful backup in BackupPC.
Perhaps i can just change an argument/option/flag somewhere, but...

Nevertheless it seemed like a good idea to have a monitoring (nagios) script
that checked that everything i put in to the conf actually shows up in
the backup
data directory.

So i am attaching the script here if anyone cares (dares) to try it:)
If you try it and have any comments at all, please send me some feedback.
Through the list will be fine too.

The script does not alter (or create) any files whatsoever.
Can be run from cmd line like this:  $ ./check_backuppc_shares -h
That will print some info.

I have only tried it with the rsync/rsyncd xfermethods so far, but it
could (should)
work with the other ones too. They have x-ShareName variables in the
same fashion
as rsync(d).
I have version 3.2.1 of BackupPC installed (via apt) in Ubuntu Server 12.04.

The user that runs the script will need to be able to read the main
config file (config.pl),
the hosts file, and browse through the data directory.

  wbr / Alex


-- 
Alexander Kolodziej
System Administrator, Tactel AB
Phone: +46761452104
Email: alexander.kolodziej AT tactel DOT se

Attachment: check_backuppc_shares.zip
Description: Zip archive

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
<Prev in Thread] Current Thread [Next in Thread>
  • [BackupPC-users] A nagios script for checking existance of backed up shares, Alexander Kolodziej <=