EMC Legato NetWorker使用手册 联系客服

发布时间 : 星期五 文章EMC Legato NetWorker使用手册更新完毕开始阅读eddafbec5ef7ba0d4a733b49

EMC LEGATO NETWORKER安装使用说明书

# # # #

# Samples: # # #

# Optional Variable: TNS_ADMIN #

# Default value: NONE #

# Description: # # #

# Samples: # #

export_environment_variables() {

export ORACLE_HOME

export NSR_RMAN_ARGUMENTS export PRECMD export POSTCMD export PATH

export NSR_SB_DEBUG_FILE #export LD_LIBRARY_PATH #export TNS_ADMIN }

###################################################################### # Do not edit anything below this line.

####################################################################### Pid=0 #

# Handle cancel signals sent by savegrp when user stops the group. #

handle_signal() {

if [ $Pid != 0 ]; then fi

kill -2 $Pid

# process to kill if we are cancelled

nsrnmostart_status=0 # did it work?

TNS_ADMIN=/disk3/oracle/app/oracle/product/8.1.6/network/admin1

This variable needs to be set if Oracle Net configuration

files are not located in default locations.If it is set you must also uncomment the export TNS_ADMIN in the function export_environment_variables below.

LD_LIBRARY_PATH=/disk3/oracle/app/oracle/product/8.1.6/lib

We suggest leaving it unset unless you have a scheduled backup problem. If it is set you must also uncomment the export LD_LIBRARY_PATH in the function export_environment_variables below.

- 37 -

EMC LEGATO NETWORKER安装使用说明书

} #

# The main portion of this shell. #

# Make sure we respond to savegrp cancellations. #

trap handle_signal 2 15

# Build the nsrnmostart command # opts=\

while [ $# -gt 0 ]; do case \

-s ) # server name

opts=\

shift 2 ;;

-N ) # save set name opts=\ shift 2 ;;

-e ) # expiration time opts=\ shift 2 ;;

-b ) # Specify pool opts=\ shift 2 ;;

-c ) # Specify the client name opts=\ shift 2 ;;

-g ) # Specify group opts=\ shift 2 ;;

-m ) # Specify masquerade opts=\ shift 2 ;; *)

# rest of options

opts=\ shift

exit 1

- 38 -

EMC LEGATO NETWORKER安装使用说明书

;; esac done

if [ \then else #

# Export all necessary environment variables #

export_environment_variables #

# Call nsrnmostart to do the backups. #print $BACKUP_COMMAND_LINE eval ${BACKUP_COMMAND_LINE} & Pid=$! wait $Pid

nsrnmostart_status=$?

if [ $nsrnmostart_status != 0 ] ; then fi exit 0

echo \echo $0 \exit 1

BACKUP_COMMAND_LINE=\

BACKUP_COMMAND_LINE=\

手工测试备份:

1、归档日志 # su - oracle

$ rman cmdfile /nsr/script/bck_arc.rcv 2、全库 # su - oracle

$ rman cmdfile /nsr/script/bck_all.rcv

Oracle自动备份的设置: Save set中请填写如下的内容:

/nsr/script/bck_all.rcv:全库备份的脚本,注意路径的完整填写。 /nsr/script/bck_arc.rcv:归档日志的脚本,注意路径的完整填写。

另外请在NetWorker Adminstrator中的backup command中填写:nsrnmo.sh

四、oracle数据库的恢复:

- 39 -

EMC LEGATO NETWORKER安装使用说明书

4.1、可以用于下的命令查看所有的数据文件。 进入管理器: su - oracle svrmgrl

svrmgrl>connect internal svrmgrl>select * from V$datafile

4.2、将数据库置于mount状态 su - oracle svrmgrl

svrmgrl>connect internal svrmgrl>startup mount

4.3、在rman中恢复所有的数据; su - oracle

rman cmdfile /nsr/scripts/res_ora.rcv

4.4、数据库恢复脚本文件: res_ora.rcv

connect target rman/rman@rman; connect catalog rman/rman@backup; run {

allocate channel t1 type ?SBT_TAPE? parms

?ENV=(NSR_DATA_VOLUME_POOLTfault,NSR_SERVER=smbackup,NSR_CLIENT=jf3,NLS_LANG=AMERICAN)?;

allocate channel t2 type ?SBT_TAPE? parms

?ENV=(NSR_DATA_VOLUME_POOLTfault,NSR_SERVER=smbackup,NSR_CLIENT=jf3,NLS_LANG=AMERICAN)?; restore database;

release channel t1; release channel t2; }

4.5、在Legato NetWorker user中恢复最新的archivelog,到archivelog的目录位置。 # su – oracle

$ rman cmdfile=res_arc.res

4.6、恢复archivelog脚本如下: res_arc.res

connect target rman/rman@rman; connect catalog rman/rman@backup;

- 40 -