Hi Josue, yes it is possible to send an email in case of a failure: You may want to check with the script the value returned by the backup operation and based on the returned value, send an email or not, you would have to check which error code the cpio returns on a failure, you can verify the $? variable (dollar and question mark) after the cpio command line inside the script... but keep reading.
A second way would be to check the logs while the backup is running and to use a pattern on the raw text to find errors and then to take the decision...keep reading. The third (and the best) is to use the solaris tool fssnap (to take a snapshot of the filesystem), this tool is used to backup live environments like your database; you still have to stop the database but you only stop it while the snapshot is being taken, which is much faster than doing the backup, when the filesytem snapshot has been taken you start the database again and then you can take your time to do the backup smootly... To finish, you could also send an SMS to your cellphone or a beeper reporting the error if it is mission critical. Best regards, Walter Lamagna, Eng, SCSA. On Wed, Aug 5, 2009 at 1:37 PM, Josue Del Valle<[email protected]> wrote: > Hi everyone, > > In the company I work for we use an application that runs on Solaris 10. > Every night we do a full backup of the system through the application > interface. As far as I can tell, and I am not a Unix person, the Oracle DB > services are stopped and a full backup of the system using CPIO function is > performed. Currently, if the backup fails, the only way I can find out is > when I come in the next morning and have an email from the system with a > message similar to this: > > > Starting backup - Tue Aug 4 23:58:01 EDT 2009 Backup type is full Export of > db01 failed on Tue Aug 4 23:58:07 EDT 2009 > > > > Find Function for File Backup Succeeded on Wed Aug 5 00:00:23 EDT 2009 > > > > CPIO function for File Backup Failed - Wed Aug 5 00:00:23 EDT 2009 Ending > backup - Wed Aug 5 00:00:48 EDT 2009 Overnight processor succeeded. > > > > What I would like to have is some sort of script that will send an > email message with "Backup Failed" to #######[email protected] whenever there > is a CPIO function failure or any type of Backup failure. Is this > possible? Thanks > in advance for your help. > > > > > > Regards, > > > > Josue > _______________________________________________ > Solaris-Users mailing list > [email protected] > http://www.filibeto.org/mailman/listinfo/solaris-users > -- Walter _______________________________________________ Solaris-Users mailing list [email protected] http://www.filibeto.org/mailman/listinfo/solaris-users
