Netbackup恢复步骤-01

来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 17:32 点击:

前段时间,做了一次nbu的同机恢复测试。
环境是这样的:
备份和还原都是在一个机器上,hostname是sg2as059。即备份的client是这个机器。数据库的实例名是test.
无catalog数据库,备份信息保留在控制文件中。
备份的master server和media server是同一台机器,hostname是sg2ts001。

前一天晚上设置nbu的policy进行备份,备份脚本在client上:

oracle@sg2as059:/usr/openv/netbackup/ext/db_ext/oracle/test> pwd
/usr/openv/netbackup/ext/db_ext/oracle/test
oracle@sg2as059:/usr/openv/netbackup/ext/db_ext/oracle/test> cat hot_database_backup.sh
#!/bin/sh
# $Header: hot_database_backup.sh,v 1.2 2002/08/06 23:51:42 $
#
#bcpyrght
#***************************************************************************
#* $VRTScprght: Copyright 1993 - 2005 VERITAS Software 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 <this file name>.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
chmod 666 $RMAN_LOG_FILE
 
# ---------------------------------------------------------------------------
# Log the start of this script.
# ---------------------------------------------------------------------------
 
echo Script $0 >> $RMAN_LOG_FILE
echo ==== started on `date` ==== >> $RMAN_LOG_FILE
echo >> $RMAN_LOG_FILE
 
# ---------------------------------------------------------------------------
# Replace /db/oracle/product/ora81, below, with

    相关新闻>>

    发表评论
    请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
    用户名: 验证码:点击我更换图片
    最新评论 更多>>

    推荐热点

    • Table函数使用简介
    • Oracle数据库Constraint约束的常用操作及异常处理
    • Bulk Collect性能分析(zz)
    • export/import的使用
    • OCP043第十五讲 Database Security
    • ORACLE10gr2数据导入MySQL方案
    • oracle 让sys用户可以使用isqlplus
    • 在oracle数据库下使用iSQL*Plus DBA访问数据库
    • Oracle行列转换小结
    网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
    Copyright © 2008-2015 计算机技术学习交流网. 版权所有

    豫ICP备11007008号-1