background image
<< Shell script | The remote server >>
<< Shell script | The remote server >>

Write all of the files

Oracle on the AIX OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-18
Remote Mirroring of an Oracle Database Using Data Replicator Software
cp $PWD/erm_setup.ksh $RMT_SCRIPT_DIR/. >> erm_setup.trace
2>&1
STATUS=$((STATUS+$?))
cp $PWD/erm.ksh $RMT_SCRIPT_DIR/. >> erm_setup.trace 2>&1
STATUS=$((STATUS+$?))
cp -r $PWD/.remote $RMT_SCRIPT_DIR >> erm_setup.trace 2>&1
STATUS=$((STATUS+$?))
cp -r $PWD/.primary $RMT_SCRIPT_DIR >> erm_setup.trace
2>&1
STATUS=$((STATUS+$?))
cp -r $PWD/goodies $RMT_SCRIPT_DIR >> erm_setup.trace 2>&1
STATUS=$((STATUS+$?))
fi
rcp $PWD/.primary/oracle/* $PRI_HOST:$PRI_SCRIPT_DIR >>
erm_setup.trace 2>&1
STATUS=$((STATUS+$?))
echo "DONE! STATUS=$STATUS"
if (( STATUS > 0 ))
then
echo "\n${B1}ERROR!${EB}\c"
echo "\tUnable to write all of the files, please review"
echo "the $PWD/erm_setup.trace file.\n"
exit 4
else
echo "\nPlease wait, cleaning up temp files...\c"
rm ${TMP_FILE[0]} > /dev/null 2>&1
rm ${TMP_FILE[1]} > /dev/null 2>&1
rm ${TMP_FILE[2]} > /dev/null 2>&1
rm ${TMP_FILE[3]} > /dev/null 2>&1
rm erm_setup.trace > /dev/null 2>&1
fi
#--------------------------------------------------------------
------------------
# End of MAIN
#--------------------------------------------------------------
------------------
echo "\n\nTo execute the main script, issue the following from
the $PRI_SCRIPT_DIR."
echo "\nerm.ksh [-c <config file name>] [-d] [-v]"
echo "\nWhere -c <config file name> specifies an alternate
configuration file to use"
echo " in place of the default of 'erm.conf'. Useful for
control of"
echo " multiple system backups."
echo " -d specifies the script to execute in debug mode.
Output should be"