




已阅读5页,还剩23页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
NBU7.5备份SAP编写:星期八不打球 yilijun_ 2013年10月23日目录 目录.2一、 SAN Client配置.31 在FT Media Server上启动nbhba模式.32 查看hba模式状态.33 修改hba模式.44 确认模式更改成功.45 配置FT Media Server服务46 验证服务.57 配置SAN 客户端.58 Master Server中配置查看SAN Client6二、 配置SAP的备份脚本和参数文件.71 为backint文件创建NetBackup的链接.72 创建并修改备份脚本和参数文件.7三、 创建并手动备份SAP的备份策略.231 在NetBackup Master Server 上创建一个新的备份策略.232 手动开启新建的sap_CEP-backup备份策略.26环境描述:备份服务器的系统为redhat linux 6.3_64安装nbu7.5,SAP为aix小机并通过san client 的模式来备份sap的数据库。Nbu7.5的master和client的安装我就不描述了,网上一查一大把。一、 SAN Client 配置1 在FT Media Server上启动nbhba 模式: # cd /usr/openv/openv/netbackup/bin/admincmd/./nbftsrv_config nbhbaInstalling nbhba driver. Uninstalled WinDriver for FT Server mode. It may be necessary to temporarily unload your QLogic driversto free up the ports for the nbhba drivers. This is an optional step. If you choose not to do this, the nbhba drivers may not have access to the HBA ports until a subsequent reboot. Would you like to unload and reload your native QLogic drivers now? y,n (y) y Are you sure you want to unload QLogic driver: qla2xxx? y,n (y) y Removing qla2xxx. Installed driver for nbhba mode.2 查看HBA 模式状态 # ./nbhba -L 2 ports recognized; 0 target mode ports; mode : driver in nbhba mode HBA Index #1 Device ID = 2432 World Wide Name = XX:XX:XX:XX:XX:XX:XX:XX Model Name = QLE2462 Port = 0 Mode = initiator (designated for other use)(138) HBA Index #2 Device ID = 2432 World Wide Name = XX:XX:XX:XX:XX:XX:XX:XX Model Name = QLE2462 Port = 1 Mode = initiator (designated for other use)(138) 3 修改 HBA 模式 Command: nbhba modify wwn -mode target root admincmd# ./nbhba -modify -wwn 21:00:00:E0:8B:9B:96:F0 -mode target Modified port with WWN 21:00:00:E0:8B:9B:96:F0 Modified port with WWN 21:01:00:E0:8B:BB:96:F0注意:这里改模式的时候,会同时更改同一块HBA上的多个端口。所以规划阶段必须要两块物理上的HBA卡,一个双口卡或者4口卡算成一个。4 确认模式更改成功 root admincmd#./nbhba -L 2 ports recognized; 2 target mode ports; mode : driver in nbhba mode HBA Index #1 Device ID = 2432 World Wide Name = XX:XX:XX:XX:XX:XX:XX:XX Model Name = QLE2462 Port = 0 Mode = initiator (designated for other use)(138) HBA Index #2 Device ID = 2432 World Wide Name = XX:XX:XX:XX:XX:XX:XX:XX Model Name = QLE2462 Port = 1 Mode = target (designated for FT Server)(8138)5 配置 FT Media Server 服务 root admincmd# ./nbftsrv_config Installing the Jungo WinDriver and Fibre Transport Server. Uninstalled WinDriver for FT Server mode. Removing ql2300_stub. The following automatic startup and shutdown scripts (respectively) have been installed. They will cause the NetBackup Fibre Transport Server daemon to be automatically shut down and restarted each time the system boots. /etc/rc.d/rc2.d/S21nbftserver /etc/rc.d/rc3.d/S21nbftserver /etc/rc.d/rc5.d/S21nbftserver /etc/rc.d/rc0.d/K03nbftserver /etc/rc.d/rc1.d/K03nbftserver /etc/rc.d/rc6.d/K03nbftserver Installed driver for FT Server mode. /etc/udev/rules.d/50-windrvr.rules does not exist, creating. /etc/udev/rules.d/50-windrvr.rules updated with Jungo WinDriver permissions. Installed WinDriver for FT Server mode. NetBackup Fibre Transport Server started. Would you like to make these changes persist after a reboot? y,n (y) y Running mkinitrd. Previous initrd image is saved at /boot/initrd-2.6.18-194.el5.img.03-23-12.13:20:23. SSID Change: MUST REBOOT TO COMPLETE INSTALLATION. 完成后重启FT Media Server6 验证服务 重启完成后验证FT Media Server针对SAN Client的服务是否启动查看是否有下面标红的服务root # cd /usr/openv/netbackup/bin/ root bin# ./bpps root 2873 1 9 13:27 ? 00:00:05 /usr/openv/netbackup/bin/nbftsrvr root 3138 1 0 13:27 ? 00:00:00 /usr/openv/netbackup/bin/vnetd -standalone root 3143 1 0 13:27 ? 00:00:00 /usr/openv/netbackup/bin/bpcd -standalone root 3147 3143 0 13:27 ? 00:00:00 bpcd root 3323 1 0 13:27 ? 00:00:00 /usr/openv/netbackup/bin/bpcompatd root 3331 1 0 13:27 ? 00:00:00 /usr/openv/netbackup/bin/nbrmms root 3353 1 0 13:27 ? 00:00:00 /usr/openv/netbackup/bin/nbsl root 3408 1 0 13:27 ? 00:00:00 /usr/openv/netbackup/bin/nbsvcmon root 3770 2873 12 13:27 ? 00:00:02 /usr/openv/netbackup/bin/nbfdrv64 -m=0x4a0009 -v=1 -s=256K到这里 FT Media Server端就配置完成了。7 配置SAN 客户端 AIX Client配置:执行/usr/openv/netbackup/bin/bpclntcmd sanclient 1启用SAN Client执行/usr/openv/netbackup/bin/bp.kill_all停止服务执行/usr/openv/netbackup/bin/bp.kill_al启动NBU服务执行/usr/openv/netbackup/bin/bpps -x确认 nbftclnt服务是否正常启动。执行系统命令cfgmgr-v后利用lsdev Cc tape确认识别到ARCHIVE Python 的驱动器8 Master Server 中配置查看 SAN Client 正确的配置;类似下图: 到此,SAN Client配置全部完成。注意:如果SAN Client没有发现2个Client HBA Num,请去客户端重新扫描下并重启nbu服务。.二、 配置SAP的备份脚本和参数文件1 为backint文件创建NetBackup 的链接ln s /usr/openv/netbackup/bin/backing /usr/sap/CEP/SYS/exe/run/backing说明:此SAP数据库的SID为CEP2 创建并修改备份脚本和参数文件2.1 创建备份脚本存放路径;/usr/openv/scripts2.2 复制脚本模本;脚本模板放在客户端/usr/openv/netbackup/ext/db_ext/sap/scripts下,复制sap_online_backup到新建的脚本目录下。如新建脚本存放路径为/usr/openv/scripts然后执行以下步骤:#cd /usr/openv/netbackup/ext/db_ext/sap/scripts#cp sap_online_backup /usr/openv/scripts#chmod 777 sap_online_backup2.3 修改红色部分的sap_online_backup的备份脚本; #bcpyrght#*#* $VRTScprght: Copyright 1993 - 2012 Symantec Corporation, All Rights Reserved $ *#*#ecpyrght#NOTE:IF your SAP user (in this script orasap) runs in C shell, environmental #variables can not be exported. In that case, you should modify this script to #work in your environment. For example:# SAP_SERVER=$SAP_SERVER; export SAP_SERVER; (Correct for Bourne and Korn shells)# can change into# setenv SAP_SERVER $SAP_SERVER; (Correct for C shell)#This environment variable are created by Netbackup (bphdb)#echo SAP_SCHEDULED = $SAP_SCHEDULEDecho SAP_USER_INITIATED = $SAP_USER_INITIATEDecho SAP_SERVER = $SAP_SERVERecho SAP_POLICY = $SAP_POLICYecho SAP_SCHED = $SAP_SCHEDecho SAP_SNC_SCHED = $SAP_SNC_SCHEDRETURN_STATUS=0# SAP_ENV - Holds environmental variables.SAP_ENV=# If SAP_SERVER exists then export it to make it available to backint. #if -n $SAP_SERVER then SAP_ENV=$SAP_ENV SAP_SERVER=$SAP_SERVER; export SAP_SERVER;#if Oracle DBA acount(orasap user) uses C Shell,comment the above line and uncomment the next line# SAP_ENV=$SAP_ENV setenv SAP_SERVER $SAP_SERVER;fi# If SAP_POLICY exists then export it to make it available to backint.#if -n $SAP_POLICY then SAP_ENV=$SAP_ENV SAP_POLICY=$SAP_POLICY; export SAP_POLICY;#if Oracle DBA account(orasap user) uses C Shell, comment the above line and uncomment the next line# SAP_ENV=$SAP_ENV setenv SAP_POLICY $SAP_POLICY;fi# If SAP_SCHED exists then export it to make it available to backint.#if -n $SAP_SCHED then SAP_ENV=$SAP_ENV SAP_SCHED=$SAP_SCHED; export SAP_SCHED;#if Oracle DBA account(orasap user) uses C Shell, comment the above line and uncomment the next line# SAP_ENV=$SAP_ENV setenv SAP_SCHED $SAP_SCHED;fi# If SAP_SNC_SCHED exists then export it to make it available to backint.#if -n $SAP_SNC_SCHED then SAP_ENV=$SAP_ENV SAP_SNC_SCHED=$SAP_SNC_SCHED; export SAP_SNC_SCHED;#if Oracle DBA account(orasap user) uses C Shell, comment the above line and uncomment the next line# SAP_ENV=$SAP_ENV setenv SAP_SNC_SCHED $SAP_SNC_SCHED;fi# Full online backup with dynamic BEGIN/END BACKUP switch #CMD_LINE=$SAP_ENV brbackup -u system/ctruck123 -c -d util_file_online -t online -m all# # The username on the su command needs to be replaced with the correct user# name.# echo Execute $CMD_LINEsu - oracep -c $CMD_LINERETURN_STATUS=$?# save and delete archive logs#if $RETURN_STATUS -eq 0 then timeStamp=date +%m%d%y%H%M%S ; br_out_file=/tmp/brarchive_out.$timeStamp ; CMD_LINE=$SAP_ENV brarchive -u system/ctruck123 -c -d util_file -sd $br_out_file# The username on the su command needs to be replaced with the correct user # name.# echo Execute $CMD_LINE su - oracep -c $CMD_LINE RETURN_STATUS=$?# If there were no redo logs to backup, brarchive will return 1. But if 1 is# returned to bphdb, job will appear as failed in the activity monitor. To# prevent Netbackup failure, check return code from brarchive. If the return code# is 1, check for message code BR0013W in the output of brarchive. If this message# is present, then there were no redo logs present to backup and its not a failure.# So in that case return 0 to bphdb. if $RETURN_STATUS = 1 ; then su - oracep -c grep BR0*13W $br_out_file /dev/null if $? = 0 ; then RETURN_STATUS=0 fi fi su - oracep -c cat $br_out_file;rm $br_out_filefiexit $RETURN_STATUS红色部分全部是要修改的地方,上面的已经全部修改成我的SAP备份环境。下面我说下主要修改参数的地方:(1)SAP_NEV 添加删除注释符(2)CMD_LINE 添加了-u system/ctruck123的账户和密码(3)su oracep 修改成了我的数据库用户名 添加system密码和数据库用户名根据各位自己的环境修改。 2.4 配置备份参数文件 initSID.utl(1) 我SAP数据库的SID为CEP,$ORACLE_HOME=/oracle/CEP/102_64#cd /usr/openv/netbackup/ext/db_ext/sap/scripts#cp initSAP.utl /oracle/CEP/102_64/dbs#cd /oracle/CEP/102_64/dbs#cp initSAP.utl initCEP.utl#chown oracep:dba initCEP.utl#chmod 755 initCEP.utl如果此目录下已经存在同名文件,则将原同名文件改名另存,然后在复制。(2) 修改initCEP.utl #*# $Copyright: Copyright 1993 - 2012 Symantec Corporation, All Rights Reserved $ * #*# backint parameters# switch_list: is required and is used as a control file to communicate with # BACKINT and BRBACKUP for online backups. A switch list file is created # every time BRBACKUP wants to backup a file or when it wants to indicate that# a backup is finished. The switch_list parameter must be set to a file path # that is located in: $ORACLE_HOME/sapbackup/.switch.lis.#switch_list /oracle/CEP/102_64/sapbackup/.switch.lis# switch_sem: is required and is used as a control file which is used between # BACKINT and BRBACKUP to communicate. After the switch list file has been # created and closed, BACKINT creates the switch semaphore file and waits until# it is deleted by BRBACKUP. The switch_sem parameter must be set to a file# path that is located in: $ORACLE_HOME/sapbackup/.switch.sem.#switch_sem /oracle/CEP/102_64/sapbackup/.switch.sem# switch_log: is required and is used as a control file which is used between # BACKINT and BRBACKUP to communicate. After the switch semaphore file has # been deleted, BACKINT opens and reads the switch log file to determine if # the process is successful. The switch log file is created by BRBACKUP. The# switch_log parameter must be set to a file path that is located in: # $ORACLE_HOME/sapbackup/.switch_log.#switch_log /oracle/CEP/102_64/sapbackup/.switch.log# backint_dir: is an optional parameter and must be set to a directory that is# public. BACKINT uses this directory for work space and to store files called# backint.times, which keeps track of backup information.#backint_dir /oracle/SAP/sapscript/backint_dir# server: is an optional parameter and is the machine name of the NetBackup # Master server. The NetBackup Master server is the name of the machine that# provides most of the administration and control for Netbackup operations and # contains the NetBackup database. If BACKINT finds a $SAP_SERVER environment# variable, the server parameters value will be overriden by the value of # $SAP_SERVER. Also, if the server parameter is not specified and there is # no environment variable then the currently configured server for # the NetBackup Client will be used.#server jupiterserver nbumaster1# client: is an optional parameter and must be set to a machine name that has # the NetBackup client software, an Oracle database, and a SAP environment. # In some cases the server and client machine will be the same machine. If # BACKINT finds a $SAP_CLIENT environment variable, the client parameter value # will be overriden by the assigned environment variable. If the client parameter# is not specified and there is no environment variable then the currently # configured NetBackup Client will be used. If BACKINT could not get the currently # configured NetBackup Client also, then it uses the value returned by # the gethostname() library function.#client jupiterclient cerpprd1# drives: is an optional parameter and should be set to the number of # simultaneous tape drives to kickoff backup. Set NetBackup Server to support# multiple simultaneous client backups and the number of storage units/tape # drives for this backup policy. Based on the number of drives specified # BACKINT will simultaneously run the same number of backup jobs.# So for example, if the drives parameter is set to 5, then 5 backup jobs will# run at the same time.# The drives parameter should be set to the following rule:# drives = Number of storage units per policy X MPX number# The drives parameter value should not exceed the Set Maxium Jobs per Client # global attribute. If BACKINT finds a $SAP_DRIVES environment variable, the# drive parameter value will be overriden by the value of the $SAP_DRIVES # variable. If the drive parameter is not specified and there is no # environment variable, default value of one will be used. # #drives 1drives 1 # policy: is an optionl parameter and should be set to the name of a SAP policy# type that has been defined in Netbackup. The SAP policy must have a schedule# type of Application Backup defined in order for BACKINT to work. If BACKINT finds# a $SAP_POLICY environment variable, the policy parameter value will be # overriden by the value of the $SAP_POLICY variable. If the policy parameter # is not specified and there is no environment variable, then BACKINT will # exit with an error.#policy sap_backuppolicy sap_CEP_backup # schedule: Is optional and must be set to the name of type Application Backup # schedule that is associates with a SAP policy type. The schedule can # define aspects of the backup such as how long Netbackup retains images, # maximum MPX per drive, storage unit, and volume pool. If BACKINT finds a # $SAP_SCHED environment variable, the schedule parameter value will be # overriden by the value of the $SAP_SCHED environment variable. If the # schedule parameter is not specified and there is no environment variable, # then, NetBackup uses the first schedule of type Application Backup # that it finds. It is higly recommended to set schedule parameter in *.utl file.#schedule Default-Application-Backupschedule Default-Application-Backup # policy2: is optional and is the name of a policy to be used for the# secondary SAP backup. The secondary backup is performed for each SAP# database backup on files that are needed to track SAP backup information.# This option would be used to save the backup information on a different# media. If policy2 is not specified, then the policy parameter value is used.#policy2 sap_sec_backup# schedule2: is optional and is the name of a Application Backup schedule to be # used for the secondary SAP backup. The secondary backup is performed for # each SAP database backup on files that are needed to track SAP backup # information. This option would be used to save the backup information on a # different media. If schedule2 is not specified, then the schedule parameter # value is used.#schedule2 userbkps# sort_backup_type: size | custom | device | drive # This parameter is optional and is used to specify four different backup # sort option. If sort_backup_type is not specified it will default to # the size option.#sort_backup_type size # sort_restore_type: image | custom | drive # This parameter is optional and is used to specify three different restore # sort option. If sort_restore_type is not specified it will default to # the image option. This option is only applicable for pre 6.0 releases. #sort_restore_type image # custom_sort_file: is optional and is used in conjunction with the # sort_backup_type and sort_restore_type parameter. If the custom option is # specified on either the sort_backup_type or sort_restore_type parameter, # then the custom_sort_file parameter needs to be set to a valid file. The # value for this parameter must be a full path name to a custom sort file and # must have public permissions. # #custom_sort_file /oracle/SAP/sapscripts/custom_sort_file# master_time_offset: is an
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 高新技术厂房股权转让与区域经济转型升级合同
- 广告位租赁合同模板
- 智慧水利实践及未来展望
- 大教学论教育思想
- 家庭保洁培训
- 酒店前台礼仪礼节培训
- 幼儿园走失事件应对策略
- 健康领域核心经验培训
- 红领巾队教育体系构建
- 幼儿园手足口病培训课件
- 事业单位聘用临时工劳动合同模板2025年
- 一个售楼处装修报价清单
- 设备安装与调试作业指导书
- 内蒙古呼和浩特市(2024年-2025年小学五年级语文)人教版综合练习(下学期)试卷及答案
- 建设工程项目成本管理制度
- 气改电合同模板
- 2023-2024学年云南省曲靖市宣威市高二下学期7月期末考试物理试题(解析版)
- 无人机基础知识问答题库100道及答案解析
- 装修工程施工合同(合集15篇)
- 2023北京西城区初二期末(下)道法试卷及答案
- 殡仪服务员考试:殡仪服务员考试考试卷及答案
评论
0/150
提交评论