Your SlideShare is downloading. ×
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库

1,468

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,468
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 图文详解安装 NetBackup 6.5 备份恢复 Oracle 10g rac 数据库o by Maclean.liu liu.maclean@gmail.comwner www.oracledatabase12g.com=&OWNER1
  • 2. About Mel Email:liu.maclean@gmail.coml Blog:www.oracledatabase12g.coml Oracle Certified Database Administrator Master 10gand 11gl Over 6 years experience with Oracle DBA technologyl Over 7 years experience with Linux technologyl Member Independent Oracle Users Groupl Member All China Users Groupl Presents for advanced Oracle topics: RAC,DataGuard, Performance Tuning and Oracle Internal.
  • 3. 我们使用 Linux 平台进行测试,OS 版本为 Oracle Enterprise Linux 5.5 x86_64:[root@nas servsoft]# cat /etc/issueEnterprise Linux Enterprise Linux Server release 5.5 (Carthage)Kernel r on an mNetbackup 6.0 仅支持 2.4 内核的 Linux 版本,2.6 内核的 Linux 版本(主流的包括 RHEL4,5Centos 等)需要使用 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 install
  • 4. the 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 enabled has 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.
  • 5. 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 中,以方便调用相关执行文
  • 6. 件;并在具有 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,为你的存储单元起一个名字,并输入相关存储目录:
  • 7. 接下来点击 NetBackup Management->Policies 选项定义 Oracle 备份使用到的备份策略,启用Backup Policy Configuration Wizard,并选择 Oracle 为备份策略类型:在客户端列表(client list)中加入需要备份 2 台 RAC 所在主机,分别为 rh1,rh2;硬件与操作系统选择 Linux,Redhat2.6
  • 8. 好了,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 ScriptCopyright 1993 - 2007 Symantec Corporation, All Rights Reserved.Installing NetBackup Client SoftwareNOTE: To install NetBackup Server software, insert the appropriateNetBackup Server cdrom.Do you wish to continue? [y,n] (y) yDo 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 configuredname 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]# ./install
  • 9. Symantec Installation ScriptCopyright 1993 - 2007 Symantec Corporation, All Rights Reserved.Installation Options1 NetBackup Add-On Product Software2 NetBackup Database Agent Softwareq To quit from this scriptChoose an option [default: q]: 2**********There are two ways to install database agent software.1. Remote Installation: Loads the software on a server withthe intent of pushing database software out to affected clients.2. Local Installation: Loads and installs the software only to thislocal machine.**********Do you want to do a local installation? [y,n] (n) y**********NetBackup Database Agent InstallationChoose the Database Agents you wish to installone at a time or select Install All Database Agents.1) NetBackup for DB22) NetBackup for Informix3) NetBackup for Lotus Notes4) NetBackup for Oracle5) NetBackup for SAP6) NetBackup for Sybase7) Install All Database Agentsq) Done Selecting Agentsx) 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 supportedon this platform and will be installed:OracleLoading the Database Agent packages into the/usr/openv/netbackup/dbext directory and installing.
  • 10. **********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_linkTue Jun 29 19:22:28 EDT 2010All 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_linkTue Jun 29 19:22:35 EDT 2010All 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/binORACLE_HOME: /s01/rac10gOracle version: 10.2.0.5.0Platform type: x86_64Linking LIBOBK:ln -s /usr/openv/netbackup/bin/libobk.so64 /s01/rac10g/lib/libobk.soDone接下来在 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> run2> { allocate channel c1 type sbtparms="ENV=(NB_ORA_SERV=nas,NB_ORA_POLICY=racdb,NB_ORA_CLIENT=rh2)";3> backup current controlfile;4> release channel c1;5> }RMAN> run2> { allocate channel c1 type sbt
  • 11. 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 catalogallocated channel: c1channel c1: sid=136 instance=racdb1 devtype=SBT_TAPEchannel c1: Veritas NetBackup for Oracle - Release 6.5 (2007072323)Starting backup at 29-JUN-10channel c1: starting full datafile backupsetchannel c1: specifying datafile(s) in backupsetincluding current control file in backupsetchannel c1: starting piece 1 at 29-JUN-10channel c1: finished piece 1 at 29-JUN-10piece handle=03lhfi11_1_1 tag=TAG20100629T192729 comment=API Version 2.0,MMSVersion 5.0.0.0channel c1: backup set complete, elapsed time: 00:00:37Finished backup at 29-JUN-10released channel: c1如上所示成功备份了当前控制文件。RMAN> run2> {3> allocate channel c1 type sbtparms="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 catalogallocated channel: c1channel c1: sid=136 instance=racdb1 devtype=SBT_TAPEchannel c1: Veritas NetBackup for Oracle - Release 6.5 (2007072323)Starting backup at 29-JUN-10channel c1: starting archive log backupsetchannel c1: specifying archive log(s) in backup setinput archive log thread=1 sequence=1 recid=2 stamp=722901460input archive log thread=1 sequence=2 recid=4 stamp=722901476input archive log thread=1 sequence=3 recid=5 stamp=722901499input archive log thread=1 sequence=4 recid=6 stamp=722904852input archive log thread=2 sequence=1 recid=1 stamp=722901426input archive log thread=2 sequence=2 recid=3 stamp=722901470input archive log thread=2 sequence=3 recid=7 stamp=722904852channel c1: starting piece 1 at 29-JUN-10channel c1: finished piece 1 at 29-JUN-10piece handle=06lhfjqr_1_1 tag=TAG20100629T195819 comment=API Version 2.0,MMSVersion 5.0.0.0channel c1: backup set complete, elapsed time: 00:00:46channel c1: deleting archive log(s)archive log filename=/arch/1_1_722899663.dbf recid=2 stamp=722901460archive log filename=/arch/1_2_722899663.dbf recid=4 stamp=722901476archive log filename=/arch/1_3_722899663.dbf recid=5 stamp=722901499archive log filename=/arch/1_4_722899663.dbf recid=6 stamp=722904852archive log filename=/arch/2_1_722899663.dbf recid=1 stamp=722901426archive log filename=/arch/2_2_722899663.dbf recid=3 stamp=722901470archive log filename=/arch/2_3_722899663.dbf recid=7 stamp=722904852Finished backup at 29-JUN-10
  • 12. Starting Control File and SPFILE Autobackup at 29-JUN-10piece handle=c-720516428-20100629-01 comment=API Version 2.0,MMS Version 5.0.0.0Finished Control File and SPFILE Autobackup at 29-JUN-10released channel: c1© 2010, www.oracledatabase12g.com. 版权所有.文章允许转载,但必须以链接方式注明源地址,否则追求法律责任.

×