How to force the use of a bp.conf in my $HOME
Hi experts.
How to force the use of a bp.conf in my $HOME.
This is my script but is not working because it is taking the bp.conf in /usr/openv/netbackup
hyperdb1:/home/oracle/dba/scripts/OSP> cat ARCHIVE_BACKUP.sh
#! /bin/ksh
ARCHIVEOSPDB=/home/oracle/dba/logs/OSP.ARCHIVE.`date '+%Y-%m-%d'`.log
echo $ARCHIVEOSPDB > /tmp/LOGARCHIVEOSPDB
if [ "$#" -ne 1 ]
then
echo "Usage : COLD_BACKUP.sh <ORACLE_SID>"
exit 1
fi
cp /home/oracle/bp.conf.archive /home/oracle/bp.conf
/usr/openv/netbackup/bin/bparchive -s $1 -w -L /home/oracle/dba/logs/OSP.ARCHIVE.`date '+%Y-%m-%d'`.log -f /home/oracle/dba/scripts/OSP/$1list
cp /home/oracle/bp.conf.normal /home/oracle/bp.conf
log=`cat /tmp/LOGARCHIVEOSPDB`
cd /home/oracle/dba/logs
cat $log >>/home/oracle/dba/logs/ARCHIVE_OSPDB_historial.log
TXTERROR=/home/oracle/dba/scripts/text_error.txt
cd /home/oracle/dba/logs/
SUBJECT="Ospdb archive log"
MAILTO=mail@mail.com
PARAM1=$(egrep -i -c "ORA-|rejected|Killed|skipped|EXP-" "$log")
PARAM2=$(egrep -i -c "Server status = 0" "$log")
if [[ $PARAM1 -gt 0 || $PARAM2 -ne 1 ]] ; then
(cat $TXTERROR;uuencode $log ARCHIVE-log.txt) | mail -s "$SUBJECT" $MAILTO
fi
This is necessary because bp.conf has this line which is needed for other backups but will gave error if used with bparchive:
IGNORE_XATTR = YES