nbu-oracle备份-恢复测试

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

●NBU实施步骤

1.添加LICENSE:

在主服务器上,打开license keys,添加新的license key

查看license状态:

确认授权生效;

2.安装配置NBU客户端(linux,unix相同)

1)安装客户端软件:在需要安装Netbackup For Linux 的服务器上放入Netbackup for linux的安装光盘,并mount所插入的光盘。Cd到光盘mount的目录;

配置/etc/hosts文件,确保备份主服务器名称和ip地址能够对应并能够正常通信;

输入./install,开始安装NBU软件,在Choose an option输入3,选择安装Netbackup 客户端软件。

在Do you want to install the NetBackup Client Software for this client?输入y,回车,确认安装。

回车。

NetBackup Client?,输入y,回车。

6.安装将开始,并自动完成。

安装完成后。如下图所示。

2)确认备份主服务器能够访问客户端:编辑备份主服务器的hosts文件,一般位于windows主目录的..\system32\drivers\etc\ 目录下,加入安装完成客户端软件的linux,unix主机名称和IP地址

通过nbu主控制台,添加备份策略的窗口,可以在备份目标中添加到刚刚完成客户端配置的主机

3)配置并验证oracle备份脚本

NBU对数据库的备份实际上是通过备份脚本和备份主服务器的交互来完成的,其备份脚本必须要经过修改,以符合现场的数据库环境,其包括三个主要参数,分别对应全备0,增量备份1

链接oracle:

Su – oracle

关闭数据库,执行/usr/openv/netbackup/bin/oracle_link

重新启动数据库

脚本示例:(需修改ORACLE_HOME,ORACLE_SID, TARGET_CONNECT_STR , RMAN_PATH, NB_ORA_CLIENT,NB_ORA_SERV,NB_ORA_POLICY,日志保留时间等参数) vi hot_database_back.sh

#!/bin/sh

# $Header: hot_database_backup.sh,v 1.3 2010/08/04 17:56:02 $

#edit by wanggang 20130304

#bcpyrght

#****************************************************************** *********

#* $VRTScprght: Copyright 1993 - 2011 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 user's 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}.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_FILE"

fi

# -----------------------------------------------------------------

# Initialize the log file.

# -----------------------------------------------------------------

echo >> $RMAN_LOG_FILE

相关文档
最新文档