I request you to review this backup script and see if the following are intact in the script. Please let me know if there are any changes that I should be doing to this script. Please treat this as urgent.
Thanks much for any help!!
1. DB2 DB Backup
2. Trap the 'Error' or 'Success' of the Backup
3. eMail the eMail ID a file with detailed message where the 'Success' or 'Failure' of the Backup will be stored in AIX once the Backup completes (Error or Normal completion)
4. Any other additions that I need to do in the script in order to ensure that the script is in GOOD Shape
I am looking to move this in to PROD and need your expert validation. Thanks Much.
Also, this script seems to be failing occasionally with SQL2428N error message. We use NetBackup and do not know why the backup ends reporting 'Log not found' but when we check the log directory, things seem to be intact but for the log which it is looking for... Wierd! . Please help!!
# <backup> (DB to Disk)
# This form is used to run DB and requires the SID, and
# the NetBackup class name as argments.
# If the db2 OS User account has a password other than,
# than the -p argment must be supplied along with the correct password.
# The -t option is the minutes between the remove and DB processes.
# The default number of Minutes to wait is 10 minutes
# If -m is specified, and an error happens, the log file will be mailed
# to Mail-name.
# <remove> (DB to Tape)
# This form is used to only remove old archive files that have been backed up.
# Files older than TAG file named /.<NetBackup Class>
# See above for options.
# The third form is used to check the /BKUP/<SID>/log_archive filesystem
# to see if it is more than 50% full. It requires the SID and optionally
# the db2 OS User account password. The percentage can be changed by
# using the -u option above.
# OS specific df command
case $(uname) in
AIX) DF="df -Pk" ;;
SunOS) DF="df -k" ;;
# Log files are written to <logdir>. Each run of this program creates
# a new log file named <program>_<process-id>.log. Logs are kept for
# <keep> days. If the job exits abnormally, a message is sent to STD out
# if the -m option is used, the message is send to the person specified.