NBU Oracle备份恢复配置手册.doc_第1页
NBU Oracle备份恢复配置手册.doc_第2页
NBU Oracle备份恢复配置手册.doc_第3页
NBU Oracle备份恢复配置手册.doc_第4页
NBU Oracle备份恢复配置手册.doc_第5页
已阅读5页,还剩33页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

NBU ORACLE备份恢复配置手册 Version 1.0Contents1安装前准备32安装配置NBU Oracle agent软件43创建Oracle备份脚本94配置备份Policy235如何手工立即发起备份326Oracle恢复341 安装前准备安装NBU SAN Media Server软件参照NBU Media Server 安装手册2 安装配置NBU Oracle agent软件rootQC_P550_731:/mnt/install/NB_65_UOptions_20070723/vDBA./install*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 installone 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 Sybase 7) Install All Database Agents q) 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) *Of the agents selected, the following are supportedon this platform and will be installed: OracleNOTE: A license key for each of these selected agentswill be required on the master server in order for theagent to function properly.Loading the Database Agent packages into the/usr/openv/netbackup/dbext directory and installing.* Installing NetBackup for Oracle Installing NetBackup for Oracle.Extracting files from /usr/openv/netbackup/dbext/OEBU.rs6000_51.tar.Z .x usr/openv/netbackupx usr/openv/netbackup/binx usr/openv/netbackup/bin/bpubsora, 137444 bytes, 269 tape blocksx usr/openv/netbackup/bin/bpdbsbora, 128302 bytes, 251 tape blocksx usr/openv/netbackup/bin/libobk.a, 108793 bytes, 213 tape blocksx usr/openv/netbackup/bin/oracle_link, 32260 bytes, 64 tape blocksx usr/openv/netbackup/bin/bporaexp, 150370 bytes, 294 tape blocksx usr/openv/netbackup/bin/bporaimp, 162223 bytes, 317 tape blocksx usr/openv/netbackup/bin/libobk.a64, 117484 bytes, 230 tape blocksx usr/openv/netbackup/bin/bporaexp64, 164480 bytes, 322 tape blocksx usr/openv/netbackup/bin/bporaimp64, 177322 bytes, 347 tape blocksx usr/openv/netbackup/dbextx usr/openv/netbackup/dbext/OEBU.rs6000_51.version, 24 bytes, 1 tape blocksx usr/openv/netbackup/extx usr/openv/netbackup/ext/db_extx usr/openv/netbackup/ext/db_ext/oraclex usr/openv/netbackup/ext/db_ext/oracle/samplesx usr/openv/netbackup/ext/db_ext/oracle/samples/rmanx usr/openv/netbackup/ext/db_ext/oracle/samples/rman/cold_database_backup.sh, 11875 bytes, 24 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/rman/cold_duplex_database_backup_full.sh, 12789 bytes, 25 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/rman/database_restore.sh, 7155 bytes, 14 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup.sh, 11538 bytes, 23 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_tablespace_backup.sh, 11154 bytes, 22 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/rman/pit_database_restore.sh, 10307 bytes, 21 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup_proxy.sh, 9983 bytes, 20 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_tablespace_backup_proxy.sh, 8575 bytes, 17 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bpend_notify.oracle_bli.sh, 27764 bytes, 55 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bpstart_notify.oracle_bli.sh, 31867 bytes, 63 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/post_checkpoint_notify.oracle_bli.sh, 21844 bytes, 43 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexpx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp/data_archiver_export.sh, 5124 bytes, 11 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp/data_archiver_export64.sh, 5130 bytes, 11 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp/bporaexp_help.param, 733 bytes, 2 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp/bporaexp_partitions.param, 1605 bytes, 4 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp/bporaexp_table_to_files.param, 1652 bytes, 4 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp/bporaexp_tables.param, 1669 bytes, 4 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp/bporaexp_tables_rows.param, 1868 bytes, 4 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimpx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/data_archiver_import.sh, 5044 bytes, 10 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/data_archiver_import64.sh, 5050 bytes, 10 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_archive.param, 1242 bytes, 3 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_archive_schema_to_files.param, 1317 bytes, 3 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_archive_to_users.param, 1510 bytes, 3 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_bfile_table.param, 1604 bytes, 4 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_help.param, 733 bytes, 2 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_ignore_rows_table.param, 1530 bytes, 3 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_large_table.param, 1542 bytes, 4 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_list.param, 1594 bytes, 4 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_old_archive.param, 1556 bytes, 4 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_partitions.param, 1513 bytes, 3 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_table_from_files.param, 1370 bytes, 3 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_table_to_files.param, 1301 bytes, 3 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_table_to_user.param, 1656 bytes, 4 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/bporaimp_tables.param, 1289 bytes, 3 tape blocksx usr/openv/netbackup/ext/db_ext/oracle/binx usr/openv/netbackup/ext/db_ext/oracle/bin/setup_bli_scripts, 18091 bytes, 36 tape blocksx usr/openv/libx usr/openv/lib/libdbsbrman.so, 2029485 bytes, 3964 tape blocksx usr/openv/lib/libbpora.so.8.0, 257994 bytes, 504 tape blocksx usr/openv/lib/libbpora.so.9.0, 258010 bytes, 504 tape blocksx usr/openv/lib/libbpora64.so.9.0, 288345 bytes, 564 tape blocksx usr/openv/lib/libnbberman.so, 161051 bytes, 315 tape blocksLiveUpdate is not installed, skipping registration step.NetBackup for Oracle installation completed.*Execution of ./install_dbext is complete.Execution of ./install is complete.File /usr/openv/tmp/install_addon_trace.2761086 contains a trace of this install.rootQC_P550_731:/mnt/install/NB_65_UOptions_20070723/vDBA配置NBU Oracle AgentrootQC_P550_731:/mnt/install/NB_65_UOptions_20070723/vDBAsu - oracleYOU HAVE NEW MAILQC_P550_731:/home/oracle$cd /usr/openv/netbackup/binQC_P550_731:/usr/openv/netbackup/bin$./oracle_linkFri Apr 3 10:07:28 BEIST 2009All 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: /oracle/app/oracle/product/9.2.0Oracle version: .0Linking LIBOBK:Moving libobk.a to libobk.a.backln -s /usr/openv/netbackup/bin/libobk.a64 /oracle/app/oracle/product/9.2.0/lib/libobk.aDonePlease check the trace file located in /tmp/make_trace.2687388 to make sure the linking process was successful.3 创建Oracle备份脚本数据库全备份脚本/usr/openv/rman/hot_database_backup_zjcj2.sh,其中红色字体部分根据oracle修改#!/bin/sh# $Header: hot_database_backup.sh,v 1.2 2002/08/06 23:51:42 $#bcpyrght#*#* $VRTScprght: Copyright 1993 - 2007 Symantec Corporation, All Rights Reserved $ *#*#ecpyrght# -# hot_database_backup.sh# -# This script uses Recovery Manager to take a hot (inconsistent) database# backup. A hot backup is inconsistent because portions of the database are# being modified and written to the disk while the backup is progressing.# You must run your database in ARCHIVELOG mode to make hot backups. It is# assumed that this script will be executed by user root. In order for RMAN# to work properly we switch user (su -) to the oracle dba account before# execution. If this script runs under a user account that has Oracle dba# privilege, it will be executed using this users account.# -# -# Determine the user which is executing this script.# - CUSER=id |cut -d( -f2 | cut -d ) -f1 # -# Put output in .out. Change as desired.# Note: output directory requires write permission.# -RMAN_LOG_FILE=$0.date +%Y%m%d%H%M%S.out# -# You may want to delete the output file so that backup information does# not accumulate. If not, delete the following lines.# -if -f $RMAN_LOG_FILE then rm -f $RMAN_LOG_FILEfi# -# Initialize the log file.# - echo $RMAN_LOG_FILEchmod 666 $RMAN_LOG_FILE # -# Log the start of this script.# - echo Script $0 $RMAN_LOG_FILEecho = started on date = $RMAN_LOG_FILEecho $RMAN_LOG_FILE # -# Replace /db/oracle/product/ora81, below, with the Oracle home path.# -ORACLE_HOME=/oracle/app/oracle/product/9.2.0export ORACLE_HOME# -# Replace ora81, below, with the Oracle SID of the target database.# -ORACLE_SID=zjcj2export ORACLE_SID# -# Replace ora81, below, with the Oracle DBA user id (account).# -ORACLE_USER=oracle# -# Set the target connect string.# Replace sys/manager, below, with the target connect string.# -TARGET_CONNECT_STR=/ # -# Set the Oracle Recovery Manager name.# -RMAN=$ORACLE_HOME/bin/rman# -# Print out the value of the variables set by this script.# -echo $RMAN_LOG_FILEecho RMAN: $RMAN $RMAN_LOG_FILEecho ORACLE_SID: $ORACLE_SID $RMAN_LOG_FILEecho ORACLE_USER: $ORACLE_USER $RMAN_LOG_FILEecho ORACLE_HOME: $ORACLE_HOME $RMAN_LOG_FILE# -# Print out the value of the variables set by bphdb.# -echo $RMAN_LOG_FILEecho NB_ORA_FULL: $NB_ORA_FULL $RMAN_LOG_FILEecho NB_ORA_INCR: $NB_ORA_INCR $RMAN_LOG_FILEecho NB_ORA_CINC: $NB_ORA_CINC $RMAN_LOG_FILEecho NB_ORA_SERV: $NB_ORA_SERV $RMAN_LOG_FILEecho NB_ORA_POLICY: $NB_ORA_POLICY $RMAN_LOG_FILE# -# NOTE: This script assumes that the database is properly opened. If desired,# this would be the place to verify that.# -echo $RMAN_LOG_FILE# -# If this script is executed from a NetBackup schedule, NetBackup# sets an NB_ORA environment variable based on the schedule type.# The NB_ORA variable is then used to dynamically set BACKUP_TYPE# For example, when:# schedule type is BACKUP_TYPE is# - -# Automatic Full INCREMENTAL LEVEL=0# Automatic Differential Incremental INCREMENTAL LEVEL=1# Automatic Cumulative Incremental INCREMENTAL LEVEL=1 CUMULATIVE# # For user initiated backups, BACKUP_TYPE defaults to incremental# level 0 (full). To change the default for a user initiated# backup to incremental or incremental cumulative, uncomment# one of the following two lines.# BACKUP_TYPE=INCREMENTAL LEVEL=1# BACKUP_TYPE=INCREMENTAL LEVEL=1 CUMULATIVE# # Note that we use incremental level 0 to specify full backups.# That is because, although they are identical in content, only# the incremental level 0 backup can have incremental backups of# level 0 applied to it.# - if $NB_ORA_FULL = 1 then echo Full backup requested $RMAN_LOG_FILE BACKUP_TYPE=INCREMENTAL LEVEL=0 elif $NB_ORA_INCR = 1 then echo Differential incremental backup requested $RMAN_LOG_FILE BACKUP_TYPE=INCREMENTAL LEVEL=1 elif $NB_ORA_CINC = 1 then echo Cumulative incremental backup requested $RMAN_LOG_FILE BACKUP_TYPE=INCREMENTAL LEVEL=1 CUMULATIVE elif $BACKUP_TYPE = then echo Default - Full backup requested $RMAN_LOG_FILE BACKUP_TYPE=INCREMENTAL LEVEL=0fi# -# Call Recovery Manager to initiate the backup. This example does not use a# Recovery Catalog. If you choose to use one, replace the option nocatalog# from the rman command line below with the # rcvcat / statement.# Note: Any environment variables needed at run time by RMAN # must be set and exported within the switch user (su) command.# -# Backs up the whole database. This backup is part of the incremental# strategy (this means it can have incremental backups of levels 0# applied to it).# We do not need to explicitly request the control file to be included# in this backup, as it is automatically included each time file 1 of# the system tablespace is backed up (the inference: as it is a whole# database backup, file 1 of the system tablespace will be backed up,# hence the controlfile will also be included automatically).# Typically, a level 0 backup would be done at least once a week.# The scenario assumes:# o you are backing your database up to two tape drives# o you want each backup set to include a maximum of 5 files# o you wish to include offline datafiles, and read-only tablespaces,# in the backup# o you want the backup to

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论