• 10.10 MB
  • 0页

symantecnbu75哈尔滨地铁实施手册

  • 0页
  • 当前文档由用户上传发布,收益归属用户
  1. 1、本文档共5页,可阅读全部内容。
  2. 2、本文档内容版权归属内容提供方,所产生的收益全部归内容提供方所有。如果您对本文有版权争议,可选择认领,认领后既往收益都归您。
  3. 3、本文档由用户上传,本站不保证质量和数量令人满意,可能有诸多瑕疵,付费之前,请仔细先通过免费阅读内容等途径辨别内容交易风险。如存在严重挂羊头卖狗肉之情形,可联系本站下载客服投诉处理。
  4. 文档侵权举报电话:19940600175。
'____________________________SymantecNetbackup7.5哈尔滨地铁实施手册____________________________74 目录1.软件安装21.1安装环境21.2Netbackup服务器安装21.3NetbackupAIX客户端软件安装141.4NetbackupAIXMediaServer软件安装192.Netbackup7.5配置252.1配置App-Cluster252.2策略向导操作273.Netbackup7.5的BMR系统恢复564.Netbackup7.5的Oracle数据库恢复604.1概要604.2备份数据库6174 1.软件安装1.1安装环境安装类型计算机名IP地址操作系统MasterLc132172.21.200.132Windows2008MediaLc01172.21.200.201AIX7.1.2.15MediaLc02172.21.200.202AIX7.1.2.15ClientAfc142172.21.200.1421.1.2hosts的修改目的:保证NBU服务器和客户端的正常解析添加位置:masterserver添加本机信息和各个客户端的信息,每个客户端需要添加masterserver的信息。1.2Netbackup服务器安装1.2.1在服务器lc132上面进行NBUmaster的安装1.找到安装介质,服务器D盘应用软件目录下面的NetBackup_7.5_Win,双击Browser.exe74 1.运行本地环境检查74 Next74 TerminalServices服务不影响安装,点击Finish完成环境检查1.开始安装,点击Instalation进入到安装界面选择ServerSoftwareInstallation74 点击Next点击Next74 输入正确的licenseKey点击NetbackupMasterServer74 设置服务器名称点击Install开始安装74 安装完成,下面添加其余的Licensekeys,点击Addkeys74 添加完所以的key之后点击Finish1.2.2安装补丁双击开始自动解压74 解压完成后点击SETUP74 点击Next点击Next74 点击Install开始安装74 安装完成点击Finish1.3NetbackupAIX客户端软件安装1.3.1安装前准备工作首先把客户端安装程序Netbackup_7.5_CLIENTS存放到服务器空间足够的目录,并赋予安装权限。74 1.3.2安装客户端软件1.3.2.1进入到软件目录运行./install开始软件安装1.3.2.2前两步选Y回车或者直接回车,然后输入NetbackupServer也就是master的名称,客户端名称默认即可进入到安装过程74 1.3.2.3一直到服务开启,最后显示successful表示安装完成1.3.2.4修改客户端oracle数据库为归档模式Bash-3.2&su–oracleBash-3.2&sqlplus/assysdbaSQL>archiveloglist74 DatabaselogmodeArchiveModeAutomaticarchivalEnabledArchivedestination/oracle/product/10.2.0/dbs/archOldestonlinelogsequence255Nextlogsequencetoarchive257Currentlogsequence257SQL>shutdownimmediateDatabaseclosed.Databasedismounted.ORACLEinstanceshutdown.SQL>startupmountORACLEinstancestarted.TotalSystemGlobalArea1610612736bytesFixedSize2084400bytesVariableSize436208080bytesDatabaseBuffers1157627904bytesRedoBuffers14692352bytesDatabasemounted.SQL>alterdatabasearchivelogDatabasealtered.SQL>altersystemsetlog_archive_dest_1="location=/archlog"scope=spfileSystemaltered.SQL>shutdownimmediateDatabaseclosed.Databasedismounted.ORACLEinstanceshutdown.SQL>startupORACLEinstancestarted.TotalSystemGlobalArea1610612736bytesFixedSize2084400bytesVariableSize436208080bytesDatabaseBuffers1157627904bytesRedoBuffers14692352bytesDatabasemounted.Databaseopened.SQL>archiveloglistDatabaselogmodeArchiveModeAutomaticarchivalEnabled74 Archivedestination/archlogOldestonlinelogsequence255Nextlogsequencetoarchive257Currentlogsequence257SQL>createpfilefromspfileFilecreated.至此oracle数据库归档开启完成1.3.2.5执行备份软件NBU和oracle数据库连接库程序oracle_link1.3.2.6关于oracle备份脚本首先,创建script目录作为脚本的存放位置,并赋予此目录的权限,/usr/openv/netbackup目录下然后复制oracle备份脚本到此目录74 赋予oracle用户对这个脚本的权限,Suoracle切换到oracle用户编辑脚本设置oracle_home设置ORACLE_SIDORACLE_USERTARGET_CONNECT_STR至此脚本编辑完成1.4NetbackupAIXMediaServer软件安装1.4.1安装前准备工作首先把客户端安装程序Netbackup_7.5_AIX64.tar存放到服务器空间足够的目录,并解压出来存放路径74 1.4.2安装MediaServer软件1.4.2.1进入到软件目录运行./install开始软件安装1.4.2.2选择Y继续1.4.2.3不参与改进计划,选n74 1.4.2.4是否安装MediaManager选Y开始安装过程,等待安装完成1.4.2.5输入Mediaserver的licensekey需要输入的license包括enterpriseclient和optionlibrarybasedtapedrive还有sharedstorageoption的license,license号见电子授权继续添加选y结束添加选n1.4.2.6配置自己为mediaserver第一个红色标记是否配置自己为masterserver,选n第二个红色标记配置master主机名称第三个红色标记确定master选y继续,需要等待几分钟时间。74 弹出下面信息添加完成继续下一步操作Default:lc132直接回车74 修改bp.conf配置文件(存放位置/usr/openv/netbackup/bp.conf)74 1.4.2.6重启NBU服务关闭查看服务运行情况开启服务**注,如果停止服务比较慢,可以在停止服务的状态下清理cache文件,具体步骤如下:至此Mediaserver安装完毕74 2.Netbackup7.5配置2.1配置App-Cluster官方提供实例操作步骤如下:TitleHowtosettheenvironmentforAPP-ClusterProblemHowtosettheenvironmentforAPP-ClusterinclusterEnvironmentSolutionEnvironment:twolinuxserver:Hostname:media1   IP:192.168.1.10 Hostname:media2    IP:192.168.1.11,The virtualservicename:media  IP:192.168.1.12masterserverhostname:masterconfigsetup:1.installmediaserveronmedia1andmedia22.addmedia192.168.1.12onmasterserverandmediaserver/etc/hosts3.addserver=mediaonmedia1andmedia2/usr/openv/netbackup/bp.conf4.runfollowcommandonmasterserverandmediaserver/usr/openv/netbackup/bin/admimcmd/nbemmcmd-addhost-machinenamemedia -machinetypeapp_cluster-netbackupversion6.5  NBEMMCMD,Version:6.5.4 Commandcompletedsuccessfully./usr/openv/netbackup/bin/admimcmd/nbemmcmd-updatehost-add_server_to_app_cluster-machinename media1-machinetypemedia -clustername media -netbackupversion6.5 NBEMMCMD,Version:6.5.4Commandcompletedsuccessfully. /usr/openv/netbackup/bin/admimcmd/nbemmcmd-updatehost-add_server_to_app_cluster-machinenamemedia2-machinetypemedia -clustername media -netbackupversion6.5 NBEMMCMD,Version:6.5.4pwdCommandcompletedsuccessfully.  Thefollowingshowtheclusterconfigurationissuccess 74  /usr/openv/netbackup/bin/admimcmd/nbemmcmd-listhosts–verbose  MachineName="media" MachineDescription="" MachineNbuType=app_cluster(7) NetBackupVersion=6.5.4.0(654000) ActiveNodeName="media1" Commandcompletedsuccessfully. Thenaddnewvirtualstorageunitonadminconsole.实际环境:Media1=lc01Media2=lc02Media=lcvip2.1.1.安装两天服务器为medialc01,lc02已经通过上面安装步骤安装配置完毕2.1.2分别添加lcvip的主机信息(ip和主机名)到master(lc132)和media(lc01,lc02)的hosts表中2.1.3分别添加server=lcvip到两天media的bp.conf(存放位置/usr/openv/netbackup/bp.conf)配置文件中2.1.4运行nbemmcmd命令添加app_clusterMasterserver和两台mediaserver都要添加以下命令Unix:/usr/openv/netbackup/bin/admimcmd/nbemmcmd-addhost-machinenamelcvip-machinetypeapp_cluster-netbackupversion7.5Windows:开始运行cmdcdc:programfilesveritasnetbackupbinadmimcmdnbemmcmd–addhost–machinenamelcvip–machinetypeapp_cluster–netbackupversion7.574 2.2策略向导操作2.2.1向导过程如下1.点击GettingStarted2.下一步74 1下一步ConfigureStorageDevices2下一步DeviceConfigurationWizard74 6.DeviceHosts,选中master和media(默认全选),点击下一步7.扫描devices完成后,点击下一步74 8.直接下一步9.默认选择点击下一步74 10.选择好drive然后点击下一步11.弹出窗口点确认,进入下一步74 12.下一步,点击完成,进入到如下界面:13.下一步下一步74 下一步,选择No然后下一步下一步,74 扫描出磁带信息,点击下一步选择清洗带74 下一步,点击完成2.2.2配置catalog备份1.下一步进入catalog备份向导74 2.下一步3.下一步74 4.备份策略,默认配置即可,点击下一步1下一步74 1存放路径74 8.邮箱不设置,点否,然后下一步1点击完成74 1策略配置完成2.2.3配置磁带74 2.3.3.1选中最后两盘磁带右键点击Change2.3.3.2Newpool选择catalogbackup74 2.3.3.3配置catalog的PolicystorageCatalog备份只需配置存储位置即可2.3.3.4配置备份作业备份作业右键点击plicies空白处选择New74 输入策略名称选择备份的类型74 存储的位置备份周期Frequency:备份频率Retention:保留周期74 设置备份开始时间,24小时模式,用鼠标选中即可74 增量备份74 备份开始时间,用鼠标选中然后duplicate,点击确定完成配置选择所要备份的客户端74 选择好平台选择备份内容(备份什么选什么)备份数据库:选择数据库备份脚本备份文件:选择文件目录备份系统:选择all_local_driver74 点击确定完成策略的创建2.3.3.5配置HAAIXoracle的备份作业首先编辑两台AIX服务器的oracle备份脚本,编辑后脚本存放位置必须相同备份作业选择备份客户端为虚拟主机名称lcvip,存储位置为lcvip的虚拟存储,74 设置好备份开始时间以及保留周期即可。以下为备份脚本内容请参考(红色标记为主要修改内容):#!/bin/sh#$Header:hot_database_backup.sh,v1.32010/08/0417:56:02$##bcpyrght#***************************************************************************#*$VRTScprght:Copyright1993-2012SymantecCorporation,AllRightsReserved$*#***************************************************************************#ecpyrght##---------------------------------------------------------------------------#hot_database_backup.sh#---------------------------------------------------------------------------#ThisscriptusesRecoveryManagertotakeahot(inconsistent)database#backup.Ahotbackupisinconsistentbecauseportionsofthedatabaseare#beingmodifiedandwrittentothediskwhilethebackupisprogressing.#YoumustrunyourdatabaseinARCHIVELOGmodetomakehotbackups.Itis#assumedthatthisscriptwillbeexecutedbyuserroot.InorderforRMAN#toworkproperlyweswitchuser(su-)totheoracledbaaccountbefore#execution.IfthisscriptrunsunderauseraccountthathasOracledba#privilege,itwillbeexecutedusingthisuser"saccount.#---------------------------------------------------------------------------#---------------------------------------------------------------------------#Determinetheuserwhichisexecutingthisscript.#---------------------------------------------------------------------------CUSER=`id|cut-d"("-f2|cut-d")"-f1`#---------------------------------------------------------------------------#Putoutputin.out.Changeasdesired.#Note:outputdirectoryrequireswritepermission.#---------------------------------------------------------------------------RMAN_LOG_FILE=${0}.out#---------------------------------------------------------------------------#Youmaywanttodeletetheoutputfilesothatbackupinformationdoes#notaccumulate.Ifnot,deletethefollowinglines.#---------------------------------------------------------------------------if[-f"$RMAN_LOG_FILE"]then74 rm-f"$RMAN_LOG_FILE"fi#-----------------------------------------------------------------#Initializethelogfile.#-----------------------------------------------------------------echo>>$RMAN_LOG_FILEchmod666$RMAN_LOG_FILE#---------------------------------------------------------------------------#Logthestartofthisscript.#---------------------------------------------------------------------------echoScript$0>>$RMAN_LOG_FILEecho====startedon`date`====>>$RMAN_LOG_FILEecho>>$RMAN_LOG_FILE#---------------------------------------------------------------------------#Replace/db/oracle/product/ora102,below,withtheOraclehomepath.#---------------------------------------------------------------------------ORACLE_HOME=/space/sys_software/oracle/app/product/11.2.0/db_1exportORACLE_HOME#---------------------------------------------------------------------------#Replaceora102,below,withtheOracleSIDofthetargetdatabase.#---------------------------------------------------------------------------ORACLE_SID=afcexportORACLE_SID#---------------------------------------------------------------------------#Replaceora102,below,withtheOracleDBAuserid(account).#---------------------------------------------------------------------------ORACLE_USER=oracle#---------------------------------------------------------------------------#Setthetargetconnectstring.#Replace"sys/manager",below,withthetargetconnectstring.#---------------------------------------------------------------------------TARGET_CONNECT_STR=sys/oracle74 #---------------------------------------------------------------------------#SettheOracleRecoveryManagername.#---------------------------------------------------------------------------RMAN=$ORACLE_HOME/bin/rman#---------------------------------------------------------------------------#Printoutthevalueofthevariablessetbythisscript.#---------------------------------------------------------------------------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#---------------------------------------------------------------------------#Printoutthevalueofthevariablessetbybphdb.#---------------------------------------------------------------------------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:Thisscriptassumesthatthedatabaseisproperlyopened.Ifdesired,#thiswouldbetheplacetoverifythat.#---------------------------------------------------------------------------echo>>$RMAN_LOG_FILE#---------------------------------------------------------------------------#IfthisscriptisexecutedfromaNetBackupschedule,NetBackup#setsanNB_ORAenvironmentvariablebasedonthescheduletype.#TheNB_ORAvariableisthenusedtodynamicallysetBACKUP_TYPE#Forexample,when:#scheduletypeisBACKUP_TYPEis#------------------------------#AutomaticFullINCREMENTALLEVEL=0#AutomaticDifferentialIncrementalINCREMENTALLEVEL=1#AutomaticCumulativeIncrementalINCREMENTALLEVEL=1CUMULATIVE74 ##Foruserinitiatedbackups,BACKUP_TYPEdefaultstoincremental#level0(full).Tochangethedefaultforauserinitiated#backuptoincrementalorincrementalcumulative,uncomment#oneofthefollowingtwolines.#BACKUP_TYPE="INCREMENTALLEVEL=1"#BACKUP_TYPE="INCREMENTALLEVEL=1CUMULATIVE"##Notethatweuseincrementallevel0tospecifyfullbackups.#Thatisbecause,althoughtheyareidenticalincontent,only#theincrementallevel0backupcanhaveincrementalbackupsof#level>0appliedtoit.#---------------------------------------------------------------------------if["$NB_ORA_FULL"="1"]thenecho"Fullbackuprequested">>$RMAN_LOG_FILEBACKUP_TYPE="INCREMENTALLEVEL=0"elif["$NB_ORA_INCR"="1"]thenecho"Differentialincrementalbackuprequested">>$RMAN_LOG_FILEBACKUP_TYPE="INCREMENTALLEVEL=1"elif["$NB_ORA_CINC"="1"]thenecho"Cumulativeincrementalbackuprequested">>$RMAN_LOG_FILEBACKUP_TYPE="INCREMENTALLEVEL=1CUMULATIVE"elif["$BACKUP_TYPE"=""]thenecho"Default-Fullbackuprequested">>$RMAN_LOG_FILEBACKUP_TYPE="INCREMENTALLEVEL=0"fi#---------------------------------------------------------------------------#CallRecoveryManagertoinitiatethebackup.Thisexampledoesnotusea#RecoveryCatalog.Ifyouchoosetouseone,replacetheoption"nocatalog"#fromthermancommandlinebelowwiththe#"catalog/@"statement.##Note:AnyenvironmentvariablesneededatruntimebyRMAN#mustbesetandexportedwithintheswitchuser(su)command.74 #---------------------------------------------------------------------------#Backsupthewholedatabase.Thisbackupispartoftheincremental#strategy(thismeansitcanhaveincrementalbackupsoflevels>0#appliedtoit).##Wedonotneedtoexplicitlyrequestthecontrolfiletobeincluded#inthisbackup,asitisautomaticallyincludedeachtimefile1of#thesystemtablespaceisbackedup(theinference:asitisawhole#databasebackup,file1ofthesystemtablespacewillbebackedup,#hencethecontrolfilewillalsobeincludedautomatically).##Typically,alevel0backupwouldbedoneatleastonceaweek.##Thescenarioassumes:#oyouarebackingyourdatabaseuptotwotapedrives#oyouwanteachbackupsettoincludeamaximumof5files#oyouwishtoincludeofflinedatafiles,andread-onlytablespaces,#inthebackup#oyouwantthebackuptocontinueifanyfilesareinaccessible.#oyouarenotusingaRecoveryCatalog#oyouareexplicitlybackingupthecontrolfile.Sinceyouare#specifyingnocatalog,thecontrolfilebackupthatoccurs#automaticallyastheresultofbackingupthesystemfileis#notsufficient;itwillnotcontainrecordsforthebackupthat#iscurrentlyinprogress.#oyouwanttoarchivethecurrentlog,backupallthe#archivelogsusingtwochannels,puttingamaximumof20logs#inabackupset,anddeletingthemoncethebackupiscomplete.##Notethattheformatstringisconstructedtoguaranteeuniquenessand#toenhanceNetBackupforOraclebackupandrestoreperformance.###NOTEWHENUSINGNETSERVICENAME:Whenconnectingtoadatabase#usinganetservicename,youmustuseasendcommandoraparmsoperandto#specifyenvironmentvariables.Inotherwords,whenaccessingadatabase#throughalistener,theenvironmentvariablessetatthesystemlevelarenot#visiblewhenRMANisrunning.Formoreinformationontheenvironment#variables,pleaserefertotheNetBackupforOracleAdmin.Guide.##---------------------------------------------------------------------------echo"step1begin!==========">>$RMAN_LOG_FILECMD_STR="74 ORACLE_HOME=$ORACLE_HOMEexportORACLE_HOMEORACLE_SID=$ORACLE_SIDexportORACLE_SID$RMANtarget$TARGET_CONNECT_STRnocatalogmsglog$RMAN_LOG_FILEappend<>$RMAN_LOG_FILERSTAT=$?else/usr/bin/sh-c"$CMD_STR">>$RMAN_LOG_FILERSTAT=$?fi#---------------------------------------------------------------------------#Logthecompletionofthisscript.#---------------------------------------------------------------------------if["$RSTAT"="0"]thenLOGMSG="endedsuccessfully"elseLOGMSG="endedinerror"fiecho>>$RMAN_LOG_FILEechoScript$0>>$RMAN_LOG_FILEecho====$LOGMSGon`date`====>>$RMAN_LOG_FILEecho>>$RMAN_LOG_FILEexit$RSTAT3.Netbackup7.5的BMR系统恢复3.1环境概要:NBU均为7.5版本,NBUMasterWindows2008172.21.201.248NBUClientAIX7.1.2.15172.21.201.121AIX74 服务器有四块硬盘,其中两块系统另外两块闲置,本次测试把系统恢复到闲置硬盘使系统可以正常启动。3.2说明:BMRmastser软件随NBUmaster软件一起安装,BMRBootserver和BMRclient软件随NBU客户端软件一起安装。BMRmaster上需要创建BMRmaster数据库,BMRbootserver上需要注册为bootserver。3.3配置文档ppt补充:MasterServer配置74 选择client,选择preparetodiscover来发现客户端信息选择SRT为启动盘74 配置好名称点击ok74 提示让客户端用光盘引导重启系统Tasks里面会有discover作业4.Netbackup7.5的Oracle数据库恢复4.1概要首先全备份oracle,然后把数据库文件以及控制文件转移到另外的目录(作用数据库找不到数据文件以及控制文件)。4.2备份数据库4.2.1手动运行备份作业1.进入控制台选择好策略手动运行74 2.等待备份作业完成74 3.备份完成4.查看最近备份(/usr/openv/netbackup/bin目录下)./bplist–Clcvip–t4-l–R/74 4.2.2恢复数据库1.创建允许异机恢复的文件(安全性保证)在master服务器创建altnames目录2.在altnames目录创建74 3.切换oracle用户登陆到数据库服务器登陆数据库关闭数据库退出监听不用关闭,以下为监听的开启和关闭关闭oracle实例74 移动数据文件和控制文件移动数据文件到nbu目录移动控制文件到nbu目录74 4.2.3masterserver配置GeneralServer4.2.4恢复脚本在目标端开始恢复:变量:node1为备份oracle的原客户端,master为masterserver#rmanstartupnomountrun{allocatechannelc1typesbt_tape;send"NB_ORA_SERV=master,NB_ORA_CLIENT=node1";restorespfilefrom"spfile_15";releasechannelc1;}shutdownimmediatestartupnomount;run{allocatechannelc1typesbt_tape;send"NB_ORA_SERV=master,NB_ORA_CLIENT=node1";restorecontrolfilefrom"cntrl_15";releasechannelc1;}74 startupmount;run{allocatechannelc1typesbt_tape;send"NB_ORA_SERV=master,NB_ORA_CLIENT=node1";restoredatabase;recoverdatabase;releasechannelc1;}4.2.5开始恢复作业4.2.5.1首先恢复控制文件,修改服务器名称和客户端名称74 74 4.2.5.2恢复数据文件脚本信息:74 在登录到masterserver界面查看恢复状态74 恢复完成恢复完成后输入74 退出数据库验证恢复数据库的可用性数据文件已经还原用oracle用户登陆到数据库开启应用完成74 4.2.5.3至此oracle数据库恢复完成74'