山东潍坊柴机厂veritas NBUnew.docx
- 文档编号:11625564
- 上传时间:2023-03-29
- 格式:DOCX
- 页数:20
- 大小:159.56KB
山东潍坊柴机厂veritas NBUnew.docx
《山东潍坊柴机厂veritas NBUnew.docx》由会员分享,可在线阅读,更多相关《山东潍坊柴机厂veritas NBUnew.docx(20页珍藏版)》请在冰豆网上搜索。
山东潍坊柴机厂veritasNBUnew
山东潍坊柴机厂veritasNBU安装配置手册
一.环境:
一台sun的机器通过光纤连接DELL的PV132T磁带库。
操作系统:
solaris9数据库:
oracle8.1.7
二.安装过程:
VERITAS NETBACKUP安装前的准备工作:
网络已连接好,各机器间可以PING通。
带库已连接到BACKUPSERVER上,并已安装好驱动。
操作系统已打好最新的PATCH(WIN2000至少打到SP2)
编辑各机的HOSTS文件,有DNS的可不用进行此步(WIN:
C:
\WINNT\system32\drivers\etc\hosts下,UNIX:
/etc/hosts
如有其他备份软件,应先卸载。
准备好NBU LICENSE和操作系统,数据库管理员口令
1.安装备份服务器(masterserver),装入光盘:
cd/cdrom/cdrom0
./install
配置磁带库机器手和磁带,作本机的文件备份测试。
将Maximumjobsperclient.改为99。
2.制定文件备份策略,进行文件备份。
3.安装ORACLE数据库AGENT,装入光盘:
cd/cdrom/cdrom0
./install
4.作NBU API库与oracle的连接在客户端执行:
su-oracle
sqlplus
sys/change_on_installassysdba(login/password)
shutdown
exit
usr/openv/netbackup/bin/oracle_link
5.编辑script:
usr/openv/netbackup/orabak下:
Example1,cold_database_backup.sh(冷备份脚本)
#
#---------------------------------------------------------------------------
#cold_database_backup.sh
#---------------------------------------------------------------------------
#ThisscriptusesRecoveryManagertotakeacold(consistent)database
#backup.Acoldbackupisonewherethedatabaseisshutdowncleanlybefore
#performingthebackup.Itisassumedthatthisscriptwillbeexecuted
#byuserroot.InorderfortheOracleutilities,sqlplus,svrmgrlandrman,
#toworkproperlyweswitchuser(su-)totheoracledbaaccountbefore
#eachexecution.IfthisscriptrunsunderauseraccountthathasOracle
#dbaprivilege,itwillbeexecutedusingthisuser’saccount.
#
#Note:
Aswritten,thisscriptwillbringdownthetargetdatabaseand
#openitwhendone.
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
#Determinetheuserwhichisexecutingthisscript.
#---------------------------------------------------------------------------
CUSER=‘id|cut-d"("-f2|cut-d")"-f1‘
#---------------------------------------------------------------------------
#Putoutputin
#Note:
outputdirectoryrequireswritepermission.
#---------------------------------------------------------------------------
RMAN_LOG_FILE=${0}.out
#---------------------------------------------------------------------------
#Youmaywanttodeletetheoutputfilesothatbackupinformationdoes
#notaccumulate.Ifnot,deletethefollowinglines.
#---------------------------------------------------------------------------
if[-f"$RMAN_LOG_FILE"]
then
rm-f"$RMAN_LOG_FILE"
fi
#-----------------------------------------------------------------
#Initializethelogfile.
#-----------------------------------------------------------------
echo>>$RMAN_LOG_FILE
chmod666$RMAN_LOG_FILE
#---------------------------------------------------------------------------
#Logthestartofthisscript.
#---------------------------------------------------------------------------
echoScript$0>>$RMAN_LOG_FILE
echo====startedon‘date‘====>>$RMAN_LOG_FILE
echo>>$RMAN_LOG_FILE
#---------------------------------------------------------------------------
#Replace/db/oracle/product/ora81,below,withtheOraclehomepath.
#---------------------------------------------------------------------------
ORACLE_HOME=/db/oracle/product/ora81##su–oracle;env
exportORACLE_HOME
#---------------------------------------------------------------------------
#Replaceora81,below,withtheOracleSIDofthetargetdatabase.
#---------------------------------------------------------------------------
ORACLE_SID=ora81##su–oracle;env
exportORACLE_SID
#---------------------------------------------------------------------------
#Replaceora81,below,withtheOracleDBAuserid(account).
#---------------------------------------------------------------------------
ORACLE_USER=oracle
#---------------------------------------------------------------------------
#Setthetargetconnectstring.
#Replace"sys/manager",below,withthetargetconnectstring.
#ThisconnectstringisusedbytheOracleutilityandrman
#---------------------------------------------------------------------------
TARGET_CONNECT_STR=sys/manager根据实际用户和口令更改
#---------------------------------------------------------------------------
#SettheOracleutility.
#ReplacesqlpluswiththeappropriateOracleutilitycall.
#Forexample,CMD=$ORACLE_HOME/bin/svrmgrl
#---------------------------------------------------------------------------
#CMD="$ORACLE_HOME/bin/sqlplus/nolog"
#CMD="$ORACLE_HOME/bin/svrmgrl"
CMD="$ORACLE_HOME/bin/sqlplus/nolog"
#---------------------------------------------------------------------------
#Relplacethefollowingwiththefullyqualifiedpathnameoftheinitfile
#foryourtargetdatabase.
#---------------------------------------------------------------------------
TARGET_INIT_FILE=/db/oracle/product/admin/ora81/pfile/initorac81.ora
#---------------------------------------------------------------------------
#SettheOracleRecoveryManagername.
#---------------------------------------------------------------------------
RMAN=$ORACLE_HOME/bin/rman
#---------------------------------------------------------------------------
#Printoutthevalueofthevariablessetbythisscript.
#---------------------------------------------------------------------------
echo>>$RMAN_LOG_FILE
echo"RMAN:
$RMAN">>$RMAN_LOG_FILE
echo"CMD:
$CMD">>$RMAN_LOG_FILE
echo"ORACLE_SID:
$ORACLE_SID">>$RMAN_LOG_FILE
echo"ORACLE_USER:
$ORACLE_USER">>$RMAN_LOG_FILE
echo"ORACLE_HOME:
$ORACLE_HOME">>$RMAN_LOG_FILE
#---------------------------------------------------------------------------
#Printoutthevalueofthevariablessetbybphdb.
#---------------------------------------------------------------------------
echo
echo"NB_ORA_FULL:
$NB_ORA_FULL">>$RMAN_LOG_FILE
echo"NB_ORA_INCR:
$NB_ORA_INCR">>$RMAN_LOG_FILE
echo"NB_ORA_CINC:
$NB_ORA_CINC">>$RMAN_LOG_FILE
echo"NB_ORA_SERV:
$NB_ORA_SERV">>$RMAN_LOG_FILE
echo"NB_ORA_POLICY:
$NB_ORA_POLICY">>$RMAN_LOG_FILE
#---------------------------------------------------------------------------
#Shutdownthetargetdatabaseinimmediatepriority.
#Thisletscurrentcallstothedatabasecomplete,butpreventsfurther
#logonsorcalls.
#
#Theshutdown-startuplogicofthisscriptcanbecommentedoutifyouknow
#thatthedatabasewillalwaysbemountedandinaconsistentstatebefore
#thisscriptisexecuted.
#
#CMD_STRissetupwiththepropersequenceofcommandstoinitiatethe
#Oracleutility,connecttothedatabaseandperformtheshutdown.
#
#Thecurrentuserischeckedandifitisrootasutotheoracleuser
#isperformedandthentheCMD_STRisexecuted.Thiswillbeperformed
#forallscheduledbackups.Ifthecurrentuserisnotroot,auser
#directedbackupisassumedandtheCMD_STRisjustexecuted.
#---------------------------------------------------------------------------
CMD_STR="
ORACLE_HOME=$ORACLE_HOME
exportORACLE_HOME
ORACLE_SID=$ORACLE_SID
exportORACLE_SID
$CMD< connect$TARGET_CONNECT_STRassysdba shutdownimmediate exit EOF " #Initiatethecommandstring if["$CUSER"="root"] then su-$ORACLE_USER-c"$CMD_STR">>$RMAN_LOG_FILE else /usr/bin/sh-c"$CMD_STR">>$RMAN_LOG_FILE fi #--------------------------------------------------------------------------- #Nowweknowthatthedatabaseiscleanlyclosedandisreadyfora #coldbackup.RMANrequiresthatthedatabasebestartedandmounted #toperformabackup. # #CMD_STRissetupwiththepropersequenceofcommandstoinitiatethe #Oracleutility,connecttothedatabase,startupthedatabaseassociated #tothespecifiedpfileinamountedmode. # #Thecurrentuserischeckedandifitisrootasutotheoracleuser #isperformedandthentheCMD_STRisexecuted.Thiswillbeperformed #forallscheduledbackups.Ifthecurrentuserisnotroot,auser #directedbackupisassumedandtheCMD_STRisjustexecuted. #--------------------------------------------------------------------------- CMD_STR=" ORACLE_HOME=$ORACLE_HOME exportORACLE_HOME ORACLE_SID=$ORACLE_SID exportORACLE_SID $CMD< connect$TARGET_CONNECT_STRassysdba startupmountpfile=$TARGET_INIT_FILE exit EOF " #Initiatethecommandstring if["$CUSER"="root"] then su-$ORACLE_USER-c"$CMD_STR">>$RMAN_LOG_FILE else /usr/bin/sh-c"$CMD_STR">>$RMAN_LOG_FILE fi echo>>$RMAN_LOG_FILE #--------------------------------------------------------------------------- #IfthisscriptisexecutedfromaNetBackupschedule,NetBackup #setsanNB_ORAenvironmentvariablebasedonthescheduletype. #TheNB_ORAvariableisthenusedtodynamicallysetBACKUP_TYPE #Forexample,when: #scheduletypeisBACKUP_TYPEis #------------------------------ #AutomaticFullINCREMENTALLEVEL=0 #AutomaticDifferentialIncrementalINCREMENTALLEVEL=1 #AutomaticCumulativeIncrementalINCREMENTALLEVEL=1CUMULATIVE # #Foruserinitiatedbackups,BACKUP_TYPEdefaultstoincremental #level0(full).Tochangethedefaultforauserinitiated #backuptoincrementalorincrementalcumulative,uncomment #oneofthefollowingtwolines. #BACKUP_TYPE="INCREMENTALLEVEL=1" #BACKUP_TYPE="INCREMENTALLEVEL=1CUMULATIVE" # #Notethatweuseincrementallevel0tospecifyfullbackups. #Thatisbecause,althoughtheyareidenticalincontent,only #theincrementallevel0backupcanhaveincrementalbackupsof #level>0appliedtoit. #--------------------------------------------------------------------------- if["$NB_ORA_FULL"="1"] then echo"Fullbackuprequested">>$RMAN_LOG_FILE BACKUP_TYPE="INCREMENTALLEVEL=0" elif["$NB_ORA_INCR"=
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 山东潍坊柴机厂veritas NBUnew 山东潍坊 柴机厂 veritas