How to monitor dump backup

I need to monitor our nightly backups and find a way to send an email out if the nightly backup does not kick off or fails.

Thanks for your help!

Maybe you could add a bit of shell code to your backup scripts, assuming that you are using a script for backups?

How are you doing "the deed"?

It is automated and scheduled through a custom DBA menu.

You'll have to be a lot more talkative if you want someone to be able to help.

So far we know you have some kind of nightly backups. They appear to be controlled by a custom script that someone (who?) wrote specifically (?) for your site. Since you call it a menu, it must be some sort of web page or gui thing, and DBA implies it is dumping some kind of database. Don't know what kind, what OS, etc. Flesh that out a bit for us, and let us know something about the script, who wrote it, and how it works. Then maybe someone can offer something more useful than just, "whoever wrote the script needs to include some reporting via email in it."

Are you using a normal unix backup using ufsdump or something like that?
If yes, you can incorporate a portion to check for the PID/files for sucessful backup if not to send out an email. Yes, it can be done. So what's your needs now?

Fair enough, We are using Oracle based GERS Retail Systems (Now called Escalate Retail). We are using Oracle 9i on a Sun 4800 running Solaris
SunOS 5.8 Generic_108528-13 sun4u sparc SUNW,Sun-Fire. The nightly backup is a dump of the Oracle database and is setup to run via cron.

Configuration file:
/dev/rmt/0un
300000
00:01:00
01:01:00
verify

Root file entry in crontabs

30 01 * * 1-6 /gers/live/admin/process_alert

process_alert info
/usr/bin/prstat -s time 1 1 | /bin/mailx -s "Process Alert Status" user@domain.com

Seems like you've stumped everyone.

So, GERS is a retail system built on Oracle. The script you are talking about called "process_alert" is just an attempt to see if the backup process is still running? Oracle does, and GERS should, have significant backup and reporting capabilities built in. Do you have any documentation or man pages you can turn to? You should be using something more directly derived from Oracle's capabilities rather than trying to roll a script in Solaris utilities. Or, at least, you should know how Oracle backups are configured and how to get them to send email alerts.

Presuming that you know what the backup process name is from the nightly email sent by the /gers/live/admin/process_alert script then you could use:

#!/bin/ksh

BACKUPPROCESS=backupprocessname

if [ -z "`ps -ef | grep ${BACKUPPROCESS} | grep -v grep`" ]; then
  echo "Your backup is not running! `date`" | mailx -s "Backup Alert" user@domain.com
fi

Replace "backupprocessname" with the actual process and call this script from cron at the appropriate time.