图文详解安装NetBackup 6.5备份恢复Oracle 10g rac 数据库(修订)
生活随笔
收集整理的這篇文章主要介紹了
图文详解安装NetBackup 6.5备份恢复Oracle 10g rac 数据库(修订)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
我們使用Linux平臺進行測試,OS版本為Oracle Enterprise Linux 5.5 x86_64: [root@nas servsoft]# cat /etc/issue Enterprise Linux Enterprise Linux Server release 5.5 (Carthage) Kernel \r on an \m Netbackup 6.0僅支持2.4內核的Linux版本,2.6內核的Linux版本(主流的包括RHEL4,5 Centos等)需要使用NBU,只能安裝Netbackup 6.5或以上版本。 現在我們有三臺主機: rh1(rac的2號節點),rh2(rac的1號節點),nas(NBU Server)。 首先需要安裝的是Netbackup Server端軟件,當然你需要用到安裝介質,你可以嘗試在Veritas的官方網站下載到最新的版本;獲取到安裝介質后,我們首先要解壓它: [root@nas netbackup]# cp NetBackup_6.5_LinuxRedhat2.6.tar.gz /tmp[root@nas tmp]# gunzip NetBackup_6.5_LinuxRedhat2.6.tar.gz[root@nas tmp]# tar -xvf NetBackup_6.5_LinuxRedhat2.6.tar在進入安裝前確認xinetd服務正確運行著:[root@nas tmp]# service xinetd statusxinetd (pid 2886) is running...[root@nas NB_65_LinuxR_x86_20070723]# ./installDo you want to install NetBackup and Media Manager files? [y,n] (y) yNetBackup and Media Manager are normally installed in /usr/openv.Is it OK to install in /usr/openv? [y,n] (y) yReading NetBackup files from /tmp/NB_65_LinuxR_x86_20070723/linuxR_x86/anb...................Enter the full path name to the directory where theappropriate installics script is located followed bya to continue. This script will then installthe package(s).OREnter q to stop this install and abort.此時我們需要輸入Netbackup ISC(Infrastructure Core Services)軟件所在的目錄,當然你也可以從Veritas官方網站下載到該軟件包,嘗試解壓:[root@nas tmp]# cp NetBackup_6.5_ICS_LinuxX86.tar.gz /tmp[root@nas tmp]# cd /tmp[root@nas tmp]# gunzip NetBackup_6.5_ICS_LinuxX86.tar.gz[root@nas tmp]# tar -xvf NetBackup_6.5_ICS_LinuxX86.tar則此時ISC安裝介質位于/tmp/NB_65_ICS_1.4.37.0_LinuxX86下,在原終端窗口中輸入該目錄Enter q to stop this install and abort./tmp/NB_65_ICS_1.4.37.0_LinuxX86Installing VRTSpbx...A NetBackup Server or Enterprise Server license key is neededfor installation to continue.Enter license key:繼續安裝,此時需要輸入您所購買的License注冊碼;如果您沒有購買該軟件但仍想使用的話,可以嘗試下面一串字符:DEX6-23FJ-T92R-O4O4-O4O4-K777-7777-EPXP-3XO。Enter license key: DEX6-23FJ-T92R-O4O4-O4O4-K777-7777-EPXP-3XODEX6-23FJ-T92R-O4O4-O4O4-K777-7777-EPXP-3XO:NetBackup Enterprise Server Base product with all the features enabledhas been registered.All additional keys should be added at this time.Do you want to add additional license keys now? [y,n] (y) nUse /usr/openv/netbackup/bin/admincmd/get_license_keyto add, delete or list license keys at a later time.Installing NetBackup Enterprise Server version: 6.5If this machine will be using a different network interface than thedefault (nas), the name of the preferred interface should be usedas the configured server name. If this machine will be part of acluster, the virtual name should be used as the configured server name.Would you like to use "nas" as the configuredname of the NetBackup server? [y,n] (y) yIs nas the master server? [y,n] (y) yDo you have any media servers? [y,n] (n) nChecking /etc/services for the needed NetBackup and Media Manager services.Copying original /etc/services file to /etc/services.NBU_062910.14:27:41Editing /etc/services to update NetBackup and Media Manager services./etc/services will be updated to add the following entries forNetBackup/Media Manager.bpjobd 13723/tcp bpjobdvmd 13701/tcp vmdacsd 13702/tcp acsdtl8cd 13705/tcp tl8cdtldcd 13711/tcp tldcdodld 13706/tcp odldtl4d 13713/tcp tl4dtshd 13715/tcp tshdtlmd 13716/tcp tlmdtlhcd 13717/tcp tlhcdrsmd 13719/tcp rsmd...................
好了Netbackup Server端軟件已經在NAS主機上安裝完成,接下來我們需要進一步配置備份策略。 將/usr/openv/netbackup/bin路徑加入到你的用戶環境變量PATH中,以方便調用相關執行文件; 并在具有X11 forwarding功能的軟件中(譬如Xmanager)中輸入jnbSA命令, 您可能遭遇java.lang.UnsatisfiedLinkError: /usr/openv/java/jre/lib/i386/libawt.so: libXp.so的錯誤, 一般是由于沒有安裝libXp(i386和x86_64版本的都裝一下)包所導致的。 正確安裝的話輸入jnbSA命令可以看到以下界面: 接著我們需要定義存儲單元(Storage Unit),如果你同我一樣沒有真實的磁帶機的話那么我們可以定義普通Disk 類型的存儲單元, 選擇Netbackup Management->Storage -> Storage Unit,在右邊分隔欄右鍵點擊New Storage Unit, 為你的存儲單元起一個名字,并輸入相關存儲目錄: 接下來點擊NetBackup Management->Policies 選項定義Oracle備份使用到的備份策略,啟用Backup Policy Configuration Wizard,并選擇Oracle為備份策略類型: 在客戶端列表(client list)中加入需要備份2臺RAC所在主機,分別為rh1,rh2;硬件與操作系統選擇Linux,Redhat2.6 好了,server端的配置完成了,接下來我們安裝client端軟件,安裝前確認你已經獲得了相關安裝介質,以NBU6.5舉例來說你需要有:NetBackup_6.5_CLIENTS2.tar.gz和NetBackup_6.5_UnixOptions.tar.gz 分別為Client端和Oracle Agent軟件。 [root@rh2 tmp]# gunzip NetBackup_6.5_UnixOptions.tar.gz
[root@rh2 tmp]# gunzip NetBackup_6.5_CLIENTS2.tar.gz
[root@rh2 tmp]# tar -xvf NetBackup_6.5_UnixOptions.tar
[root@rh2 tmp]# tar -xvf NetBackup_6.5_CLIENTS2.tar
[root@rh2 tmp]# cd NB_65_CLIENTS2_20070723/
[root@rh2 NB_65_CLIENTS2_20070723]# ./installSymantec Installation Script
Copyright 1993 - 2007 Symantec Corporation, All Rights Reserved.Installing NetBackup Client SoftwareNOTE: To install NetBackup Server software, insert the appropriate
NetBackup Server cdrom.Do you wish to continue? [y,n] (y) y
Do you want to install the NetBackup client software for this client? [y,n] (y) yThis package will install Linux/RedHat2.6 client.This package will install NetBackup client 6.5.Enter the name of the NetBackup server : nasWould you like to use "rh2" as the configured
name of the NetBackup client? [y,n] (y) y
........................
File /usr/openv/tmp/install_trace.10994 contains a trace of this install.
That file can be deleted after you are sure the install was successful.[root@rh2 tmp]# cd NB_65_UOptions_20070723/
root@rh2 NB_65_UOptions_20070723]# ./installSymantec Installation Script
Copyright 1993 - 2007 Symantec Corporation, All Rights Reserved.Installation Options1 NetBackup Add-On Product Software
2 NetBackup Database Agent Softwareq To quit from this script
Choose an option [default: q]: 2**********There are two ways to install database agent software.1. Remote Installation: Loads the software on a server with
the intent of pushing database software out to affected clients.2. Local Installation: Loads and installs the software only to this
local machine.**********Do you want to do a local installation? [y,n] (n) y**********NetBackup Database Agent InstallationChoose the Database Agents you wish to install
one at a time or select Install All Database Agents.1) NetBackup for DB2
2) NetBackup for Informix
3) NetBackup for Lotus Notes
4) NetBackup for Oracle
5) NetBackup for SAP
6) NetBackup for Sybase7) Install All Database Agentsq) Done Selecting Agents
x) Exit from this ScriptChoose an option: 4Choose an option: qYou have chosen to install these Database Agents:NetBackup for OracleIs this list correct? [y,n] (y) y**********Of the agents selected, the following are supported
on this platform and will be installed:OracleLoading the Database Agent packages into the
/usr/openv/netbackup/dbext directory and installing.**********Installing NetBackup for OracleInstalling NetBackup for Oracle...
..........................
NetBackup for Oracle installation completed.完成NBU客戶端和Netbackup for Oracle Agent安裝后,我們還需要對MML介質庫文件進行鏈接,使用dba或oinstall組賬戶執行/usr/openv/netbackup/bin/oracle_link文件:
[root@rh2 NB_65_UOptions_20070723]# su - maclean
[maclean@rh2 ~]$ cd /usr/openv/netbackup/bin/
[maclean@rh2 bin]$ ./oracle_link
Tue Jun 29 19:22:28 EDT 2010
All Oracle instances should be shutdown before running this script.Please log into the Unix system as the Oracle owner for running this scriptDo you want to continue? (y/n) [n]
[maclean@rh2 bin]$ echo $ORACLE_HOME
/s01/rac10g
[maclean@rh2 bin]$ ./oracle_link
Tue Jun 29 19:22:35 EDT 2010
All Oracle instances should be shutdown before running this script.Please log into the Unix system as the Oracle owner for running this scriptDo you want to continue? (y/n) [n] yLIBOBK path: /usr/openv/netbackup/bin
ORACLE_HOME: /s01/rac10g
Oracle version: 10.2.0.5.0
Platform type: x86_64
Linking LIBOBK:
ln -s /usr/openv/netbackup/bin/libobk.so64 /s01/rac10g/lib/libobk.so
Done
接下來在rh2主機上進行備份測試:
[maclean@rh2 bin]$ rman target /Recovery Manager: Release 10.2.0.5.0 - Production on Tue Jun 29 19:26:00 2010Copyright (c) 1982, 2007, Oracle. All rights reserved.connected to target database: RACDB (DBID=720516428)RMAN> run
2> { allocate channel c1 type sbt parms="ENV=(NB_ORA_SERV=nas,NB_ORA_POLICY=racdb,NB_ORA_CLIENT=rh2)";
3> backup current controlfile;
4> release channel c1;
5> }
RMAN> run
2> { allocate channel c1 type sbt parms="ENV=(NB_ORA_SERV=nas,NB_ORA_POLICY=racdb,NB_ORA_CLIENT=rh2)";
3> backup current controlfile;
4> release channel c1;
5> }using target database control file instead of recovery catalog
allocated channel: c1
channel c1: sid=136 instance=racdb1 devtype=SBT_TAPE
channel c1: Veritas NetBackup for Oracle - Release 6.5 (2007072323)Starting backup at 29-JUN-10
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including current control file in backupset
channel c1: starting piece 1 at 29-JUN-10
channel c1: finished piece 1 at 29-JUN-10
piece handle=03lhfi11_1_1 tag=TAG20100629T192729 comment=API Version 2.0,MMS Version 5.0.0.0
channel c1: backup set complete, elapsed time: 00:00:37
Finished backup at 29-JUN-10released channel: c1如上所示成功備份了當前控制文件。
RMAN> run
2> {
3> allocate channel c1 type sbt parms="ENV=(NB_ORA_SERV=nas,NB_ORA_POLICY=racdb)";
4> backup archivelog all delete input;
5> release channel c1;
6> }using target database control file instead of recovery catalog
allocated channel: c1
channel c1: sid=136 instance=racdb1 devtype=SBT_TAPE
channel c1: Veritas NetBackup for Oracle - Release 6.5 (2007072323)Starting backup at 29-JUN-10
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=1 recid=2 stamp=722901460
input archive log thread=1 sequence=2 recid=4 stamp=722901476
input archive log thread=1 sequence=3 recid=5 stamp=722901499
input archive log thread=1 sequence=4 recid=6 stamp=722904852
input archive log thread=2 sequence=1 recid=1 stamp=722901426
input archive log thread=2 sequence=2 recid=3 stamp=722901470
input archive log thread=2 sequence=3 recid=7 stamp=722904852
channel c1: starting piece 1 at 29-JUN-10
channel c1: finished piece 1 at 29-JUN-10
piece handle=06lhfjqr_1_1 tag=TAG20100629T195819 comment=API Version 2.0,MMS Version 5.0.0.0
channel c1: backup set complete, elapsed time: 00:00:46
channel c1: deleting archive log(s)
archive log filename=/arch/1_1_722899663.dbf recid=2 stamp=722901460
archive log filename=/arch/1_2_722899663.dbf recid=4 stamp=722901476
archive log filename=/arch/1_3_722899663.dbf recid=5 stamp=722901499
archive log filename=/arch/1_4_722899663.dbf recid=6 stamp=722904852
archive log filename=/arch/2_1_722899663.dbf recid=1 stamp=722901426
archive log filename=/arch/2_2_722899663.dbf recid=3 stamp=722901470
archive log filename=/arch/2_3_722899663.dbf recid=7 stamp=722904852
Finished backup at 29-JUN-10Starting Control File and SPFILE Autobackup at 29-JUN-10
piece handle=c-720516428-20100629-01 comment=API Version 2.0,MMS Version 5.0.0.0
Finished Control File and SPFILE Autobackup at 29-JUN-10released channel: c1
總結
以上是生活随笔為你收集整理的图文详解安装NetBackup 6.5备份恢复Oracle 10g rac 数据库(修订)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 关于rc.local启动程序
- 下一篇: HOWTO:用InstallShield