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
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