Why do complicated? Rsnapshot and cron have this feature built-in.
If you simply set "verbosity 2" in your rsnapshot.conf, then it will only print out messages (and thus, the Cron daemon will only email you) if there is an error.
If you want to get daily "success" messages, just set "verbosity 3". Then you'll get an email after every run. This is not convenient because you must read them on a daily basis (to see if the text indicates an error instead of the expected daily output).
Note, for cron-generated emails to work you need to do something like the following:
- If using root's crontab, then set a valid email address alias for "root" in /etc/aliases. Then run "newaliases". You should do this for every server you monitor anyway, as various system processes (like failed security updates, intrusion detection, mdraid, or other services) will email root < at > localhost by default.
- If using a local user account for the crontab, have that user's email forward to your actual address.
- Alternatively, you can just set the MAILTO variable in your crontab. Then it doesn't matter what aliases are set up, it will send mail to whatever's in MAILTO.
I do agree that all critical services should have an external monitor with alerts (I prefer ServerDensity). But for a simple "email me if it fails" feature, nothing else is required.
--Derek Simkowiak
On 01/10/2012 04:05 PM, Aaron Johnson wrote: I like Nagios, I have a script that reads all my rsnapshot config and writes out the Nagios check config files.
There are 2 checks involved (not counting the host up check)
- A verification script that all rsnapshot configs have been read in and are in Nagios <- got to monitor the monitor to make sure it's correct
- A check that each backup mount is less then X time old from the last update.
Once I get back to the office I can see if these are scripts I can release or if they are "propected" by work copyright.
Thanks,
Aaron
On 1/10/2012 2:06 PM, Scott Hess wrote: On Tue, Jan 10, 2012 at 12:26 PM, David Cantrell <david < at > cantrell.org.uk> ([email]david < at > cantrell.org.uk[/email]) wrote:
On Tue, Jan 10, 2012 at 05:50:50PM +0000, Miguel Almeida wrote:
I was wondering what approaches you guys usually follow to achieve this.
I take it you might have some sort of warning and not just a "blind
trust" that all the backups are working as expected.
For my own backups, I have a daily cron job that checks that daily.0 is
less than 24 hours old and emails me if it isn't. If I were using
rsnapshot at work, I'd have a look to see if I could make red flashing
lights appear in a Nagios dashboard instead.
Due to this thread, I ran a test on my similar script ... and found
out that the emails go to my spam folder. I've fixed that by telling
gmail that that specific address never spams, but it's something else
to check!
-scott
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net ([email]rsnapshot-discuss < at > lists.sourceforge.net[/email])
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free!
http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net ([email]rsnapshot-discuss < at > lists.sourceforge.net[/email])
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss