Attention: All pages of this wiki depend on the pages that come before it, in order as they are listed on the Main Page. Please check for Dependencies.
Please also look at What You Need to Know Before Using This Wiki

/root/scripts/rsnap.daily.sh

From COCNM
Revision as of 02:19, 19 September 2013 by Bob (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
#!/bin/sh

mount -a

rsnapshot daily

if [[ $(tail -10 /var/log/rsnapshot.log | grep -i error) != "" ]]; then
	tail /var/log/rsnapshot.log | mail -s "RSNAPSHOT ERROR" bob.miller@computerisms.com	
elif [[ $(tail -10 /var/log/rsnapshot.log | grep -i warning) != "" ]]; then
	tail /var/log/rsnapshot.log | mail -s "Rsnapshot Warning" bob.miller@computerisms.com	
elif [[ $(tail -5 /var/log/rsnapshot.log | grep -i success) != "" ]]; then
	tail /var/log/rsnapshot.log | mail -s "Rsnapshot Success" bob.miller@computerisms.com	
fi