第1页共24页目录1.整体备份环境描述...................................................................................................21.1备份主机概要.........................................................................................21.2备份系统架构图......................................................................................22.NetBackupMediaserver的安装..............................................................................33.备份客户端的安装:...............................................................................................44.Oracleagent安装及配置.......................................................................................55.备份策略设置.........................................................................................................165.4AOADB1ORACLE数据库备份.........................................................165.7OA系统solaris系统备份....................................................................185.8Aoadb1oraclecontrolfile备份.............................................................206.现有磁带信息.........................................................................................................227.常用netbackup命令..............................................................................................24第2页共24页1.整体备份环境描述1.1备份主机概要由abackup(windows2000Server)作为备份服务器,负责备份管理,相关配置如下表示:主机名操作系统IP地址备份类型数据库abackup(masterserver)Windows10.100.4.5aoadb1(mediaserver)Solaris910.100.2.80系统备份Oracle数据库BMRclientaoaacd1Solaris910.100.2.83文件备份BMRmainserveraoatrs1Solaris910.100.2.86系统备份BMRclientaoaweb1Solaris910.100.250.80系统备份BMRclientamail1Solaris910.100.250.8系统备份BMRclient/mss/maildata1.2备份系统架构图备份系统架构图如下示:第3页共24页2.NetBackupMediaserver的安装在aoadb1服务器中安装Netbackupmediaserver软件:a.修改/etc/hosts文件增加如下:10.100.2.80aoadb110.100.4.5abackup10.100.2.1ak3db110.100.2.2ak3db210.100.2.83aoaacd110.100.2.86aoatrs110.100.250.80aoaweb110.100.250.133amail1b.在服务器中安装备份NetBackupclient软件:#./installVERITASInstallationScript第4页共24页Copyright1993-2003VERITASSoftwareCorporation,AllRightsReserved.InstallationOptions1NetBackup2NetBackupClientSoftware3NetBackupClientJavaSoftwareqToquitfromthisscriptChooseanoption[default:q]:1NetBackupinstallstotherunningrootenvironment,bydefault.Areyouinstallingtotherunningrootenvironment?[y,n](y)ProcessingpackageinstanceVRTSnetbpfrom/tmp/veritas/solaris按提示完成安装。c.NetBackup配置文件/usr/openv/netbackup/bp.conf:SERVER=abackupSERVER=aoadb1SERVER=ak3db1SERVER=ak3db23.备份客户端的安装:在下列服务器安装Netbackup客户端软件:10.100.2.83aoaacd110.100.2.86aoatrs110.100.250.80aoaweb110.100.250.133amail1a.修改/etc/hosts文件增加如下:10.100.2.80aoadb110.100.4.5abackup10.100.2.1ak3db110.100.2.2ak3db210.100.2.83aoaacd1第5页共24页10.100.2.86aoatrs110.100.250.80aoaweb110.100.250.133amail1b.在服务器中安装备份NetBackupclient软件:#./installVERITASInstallationScriptCopyright1993-2003VERITASSoftwareCorporation,AllRightsReserved.InstallationOptions1NetBackup2NetBackupClientSoftware3NetBackupClientJavaSoftwareqToquitfromthisscriptChooseanoption[default:q]:2NetBackupinstallstotherunningrootenvironment,bydefault.Areyouinstallingtotherunningrootenvironment?[y,n](y)ProcessingpackageinstanceVRTSnetbpfrom/tmp/veritas/solaris按提示完成安装。c.NetBackup配置文件/usr/openv/netbackup/bp.conf:SERVER=abackupSERVER=ak3db1SERVER=ak3db2CLIENT_NAME=amail1(oraoaacd1,aoatrs1,aoaweb1)4.Oracleagent安装及配置a.在aoadb1服务器中安装备份NetBackuporacleagent软件:#./instllb.确认oracle已处于归档模式:$sqlplus/nologSQLconnect/assysdba第6页共24页SQLarchiveloglist;c.作RMAN接口库文件/oracle/product/9.2.0/lib/libobk.a连接:执行/usr/openv/netbackup/bin/oracle_link/oracle/product/9.2.0/lib/libobk.a---/usr/openv/netbackup/bin/libobk.a64d.修改oracle备份脚本/usr/openv/scripts/hot_database_backup.sh:#!/bin/sh#$Header:hot_database_backup.sh,v1.22002/08/0623:51:42$##bcpyrght#***************************************************************************#*$VRTScprght:Copyright1993-2003VERITASSoftwareCorporation,AllRightsReserved$*#***************************************************************************#ecpyrght##---------------------------------------------------------------------------#hot_database_backup.sh#---------------------------------------------------------------------------#ThisscriptusesRecoveryManagertotakeahot(inconsistent)database#backup.Ahotbackupisinconsistentbecauseportionsofthedatabaseare#beingmodifiedandwrittentothediskwhilethebackupisprogressing.#YoumustrunyourdatabaseinARCHIVELOGmodetomakehotbackups.Itis#assumedthatthisscriptwillbeexecutedbyuserroot.InorderforRMAN#toworkproperlyweswitchuser(su-)totheoracledbaaccountbefore#execution.IfthisscriptrunsunderauseraccountthathasOracledba#privilege,itwillbeexecutedusingthisuser'saccount.#---------------------------------------------------------------------------#---------------------------------------------------------------------------第7页共24页#Determinetheuserwhichisexecutingthisscript.#---------------------------------------------------------------------------CUSER=`id|cut-d(-f2|cut-d)-f1`#---------------------------------------------------------------------------#Putoutputinthisfilename.out.Changeasdesired.#Note:output