I have written a script which looks through a file, when a backup fails to output a releavnt message.I am finding that when a backup fails with Status 1, all the Status_Messages that being with Status 1* in the nberrors_rules file is being reported, as shown above.
It should only report the following message.
STATUS_MESSAGE ^1$ See BOA-NBU-1. Partial success.
Can you help.
=========== SCRIPT =============
set -x
RULES=nberrors_rules_NEW
STCODE=1
MESSAGE=`awk <$RULES '/^STATUS_MESSAGE / && $2 ~ '/$STCODE/' { for(a=3;a<NF+1;a++) {printf "%s ",$a }}'`
=========== nberrors_rules_NEW =============
cat nberrors_rules_NEW
STATUS_MESSAGE ^1$ See BOA-NBU-1. Partial success.
STATUS_MESSAGE ^6$ See BOA-NBU-16. Failed to backup requested files.
STATUS_MESSAGE ^(14|24|40|41)$ See BOA-NBU-2. Network problems.
STATUS_MESSAGE ^(42|44|47|54)$ See BOA-NBU-2. Network problems.
STATUS_MESSAGE ^(56|58)$ See BOA-NBU-2. Network problems.
STATUS_MESSAGE ^(28|36)$ See BOA-NBU-3. System overloaded.
STATUS_MESSAGE ^(46|59)$ See BOA-NBU-4. Client config problems.
STATUS_MESSAGE ^50$ See BOA-NBU-5. Client process aborted.
STATUS_MESSAGE ^57$ See BOA-NBU-6. NetBackup client service not responding.
STATUS_MESSAGE ^(63|150)$ See BOA-NBU-7. Backup aborted.
STATUS_MESSAGE ^71$ See BOA-NBU-8. None of the files to backup exist.
STATUS_MESSAGE ^84$ See BOA-NBU-9. Media write error.
STATUS_MESSAGE ^96$ See BOA-NBU-10. No usable tapes found for backup.
STATUS_MESSAGE ^99$ See BOA-NBU-11. NDMP backup failure.
STATUS_MESSAGE ^121$ See BOA-NBU-12. No usable tapes found for catalog backup.
STATUS_MESSAGE ^196$ See BOA-NBU-13. Backup window closed.
STATUS_MESSAGE ^219$ See BOA-NBU-14. Storage unit is unavailable.
STATUS_MESSAGE ^252$ See BOA-NBU-15. Vault or synthetic backup failed.
=========== OUTPUT =============
SYSTEM:/tmp/Script_Test
+ RULES=/usr/openv/netbackup/BOA_scripts/nberrors_rules_NEW
+ STCODE=1
+ + awk /^STATUS_MESSAGE / && $2 ~ /1/ { for(a=3;a<NF+1;a++) {printf "%s ",$a }}
+ 0< /usr/openv/netbackup/BOA_scripts/nberrors_rules_NEW
MESSAGE=See BOA-NBU-1. Partial success. See BOA-NBU-2. Network problems. See BOA-NBU-7. Backup aborted. See BOA-NBU-8. None of the files to backup exist. See BOA-NBU-12. No usable tapes found for catalog backup. See BOA-NBU-13. Backup window closed. See BOA-NBU-14. Storage unit is unavailable.
King RegardsJunes