Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making conditional pstcmd savepnpc feature

Status
Not open for further replies.

Iago77

IS-IT--Management
Jun 9, 2003
125
0
0
ES
Hello everydoby,

I'm planning the design of a script with savepnpc facility:

PRECMD: stop DB
PSTCMD: startDB; Condition

Condition: if backup is done ok; then erase archiving files.

Is there any way to know the result of the backup before the group finishes?? Until now, I had used the following script:

pstcmd: "/etc/oracle/end_backup_MODIBU; ( /scripts/findfailed.sh /nsr/tmp/sec/sg/HotOracle/* && /etc/oracle/erasing_archives_MODIBU ) \> /scripts/post.out 2\>&1";

The findfailed.sh script consists of:

GREP=/usr/xpg4/bin/grep
STRINGS=/usr/bin/strings

if [ -f $1 ];
then
$STRINGS $1 | $GREP -Ev '.ctl|.log' | $GREP -q -E "failed|changed|aborted"
if [ $? -eq 0 ];
then
exit 1;
else
exit 0
fi
else
exit 1
fi

Many thanks in advance,

Iago
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top