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: Difference between revisions

From COCNM
Jump to navigation Jump to search
m (1 revision)
 
(No difference)

Latest revision as of 01:19, 19 September 2013

#!/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