分类: DB2/Informix
2013-08-30 12:07:04
总的思想如下: 对于生产系统,建议回退的方法如下: 对于生产系统,数据库是最重要的部分,因此我们建议采用如下的两种数据备份方式,充分保护数据库的安全;在shutdown数据库之前,先用数据库自己的命令对全库做一次热备份;shutdown数据库以后,再做一次数据库的冷备份;最好是将数据库的冷备份cp到另外一台机器上(如果条件允许的话)或备份到带库上。 万一出现数据库不能启动的现象,首先采用用冷备份出来的数据恢复数据库。然后再采用用热备份出来的数据恢复数据库。 对于操作系统,则应该采用各个操作系统的指令先对系统做一次0级备份,出现问题,采用操作系统的指令恢复系统到操作之前的状态就可以了。 在安装legato备份软件之前要求如下: 1 首先对操作系统进行一次系统0级备份,应在次日(12月6日)0:00之前完成。 2 对informix数据库做一次0级热备份,要求应在次日(12点6日)0:00之前完成。 操作过程如下: 1 应首先在standby机器上uninstall informix数据库的ISM;具体操作命令以及过程如下: Task 1a: Uninstall ISM Software on UNIX If your Informix Dynamic Server contains ISM, you must delete ISM. To uninstall ISM: 1. Log in as user informix. 2. Change to the Informix directory: # cd $INFORMIXDIR/bin 3. Shut down the ISM daemons. # ./ism_shutdown (在standby机器上不需要执行此命令) Important: The ism_shutdown command shuts down the ISM daemons nsrd, nsrexecd, nsrmmdbd, and nsrindexd. The command does not remove the ISM executables in $INFORMIXDIR/bin, the symbolic link /nsr, or the various ISM files | ||||||
jekky 回复于:2004-02-04 13:32:33 | ||||||
in$INFORMIXDIR/ism. 4. Verify that the daemons are shut down: # ps -ef | grep nsr 5. Place the ISM executables to a temporary directory. 将ISM的有关执行文件转移到一个指定的文件夹。用于将来回退的时候恢复。 # mkdir ISM.TMP # mv ism* ISM.TMP # mv nsr* ISM.TMP # mv mm* ISM.TMP # mv save* ISM.TMP # mv scanner ISM.TMP # mv uasm ISM.TMP # mv recover ISM.TMP # mv ansrd ISM.TMP 6. Move the ISM catalogs to a temporary directory: # cd $INFORMIXDIR # mv ism ISM.BAK 7. Remove the symbolic link to the ISM catalogs: # mv /nsr /var/legato 8. Remove the call to ism_catalog from the $INFORMIXDIR/bin/onbar script . 我们推荐注释掉该行,如果存在的话。 9. Remove any references to ISM in the informix user environment variable PATH. 我们推荐注释掉该行,如果存在的话。 10. Edit the $INFORMIXDIR/etc/$ONCONFIG file and comment out the following line, if it exists: #BAR_BSA_LIB 2 install legato networker client 将相关的文件ftp上传到/var/legato文件夹下; 要求/opt要有大于100M的硬盘空间。 1运行swinstall & 选择安装legato NetWorker的client 和man。 2 编辑该服务器的 /etc/hosts 文件,增加如下内容: ip backup server name 3 在备份服务器上 vi /etc/hosts ,增加如下内容: ip1 server1 name ip2 server2 name ip3 server name #this is informix float IP 4 编辑需要安装软件的服务器的 /nsr/res/servers 文件,增加如下内容: backup server name 5 编辑服务器root用户的profile文件,在PATH环境变量中增加如下部分: /opt/networker/bin 6 运行一次 #. ./.profile 7 手工启动networker的进程: # /sbin/init.d/networker start 8 检验进程是否正常启动: # ps –ef|grep nsr 如果有 nsrd和nsrexed则说明正常。 9 在备份服务器上增加如下客户端: server1 ,server2, server 10 在新安装软件的机器上运行如下命令: # nwbackup & 手工指定 /etc/hosts文件测试文件备份是否正常。 11 运行如下命令安装networker for informix的module: # /var/legato/nmi_ize -i 12 Updating the $ONCONFIG File To update the $ONCONFIG file: 1. Set the BAR_BSALIB_PATH variable in the $ONCONFIG file to ? /usr/lib/libxnmi. sl.1 Note: For some Informix servers (for example, Informix Dynamic Server version
jekky 回复于:2004-02-04 13:33:41
|
9.1x) the BAR_BSALIB_PATH variable does not have effect, in which case you | must make a symbolic link of libxnmi.sl.1 to ibsad001.sl. For more information, and the location of the XBSA shared library, refer to your Informix Dynamic Server Release Notes. 2. Set the following variables in the $ONCONFIG file to the following: ? ISM_DATA_POOL DBMIData ? ISM_LOG_POOL DBMILogs Updating the Informix User’s Profile To update the Informix User’s profile in your informix user’s profile <$INFORMIXDIR/.profile> add the following variables: NSR_DATA_VOLUME_POOL=Default NSR_LOG_VOLUME_POOL=Default export NSR_DATA_VOLUME_POOL export NSR_LOG_VOLUME_POOL 13 Update the sm_versions File You must update the shared NetWorker XBSA library links because ON-Bar does not automatically update the required version values for the shared NetWorker XBSA library into the sysutils.bar_version table or the sm_versions file. Without the required values for NetWorker XBSA, ON-Bar commands fail and the following message is displayed: ERROR: Version 1.0.1 of the XBSA shared library is not compatible with version 1 of ON-Bar. To update the bar_version table, you must update the sm_versions file. For Informix 9.x a. Place the database server online. b. Connect to sysutils from dbaccess. c. Enter the SQL insert command: insert into bar_version values ('1', '1.0.1', 'nwbsa', '1'); d. 用select语句查询一下 select * from bar_version 14 修改/opt/informix/bin/onbar,注释掉如下内容: #if [ $onbar_d_return -eq 0 -a \( "$1" = -b -o "$1" = -l \) -a -x ${INFORMIXDIR}/bin/ism_catalog ] ; then #${INFORMIXDIR}/bin/ism_catalog -create_bootstrap -pool ISMData > /dev/null 2>&1 #fi 注意修改/opt/informix/etc/onconfig,注意修改如下内容: LTAPEDEV something # Log tape device path ISM_DATA_POOL DBMIData ISM_LOG_POOL DBMILogs 15 用如下的命令先测试手工备份: onbar –b rootdbs 同时打开另外一个窗口查看备份过程: tail –f /tmp/bar_act.log 16 手工备份成功后,修改legato的脚本: vi /opt/networker/bin/nsrdbmi 注意查看并修改如下内容: NSR_DATA_VOLUME_POOL="Default" NSR_LOG_VOLUME_POOL="Default" INFORMIXDIR=/opt/informix ONCONFIG=onconfig PATH=$INFORMIXDIR/bin:/bin:/usr/sbin:/opt/networker/bin:/usr/opt/networker/bin:/usr/bin 然后在备份服务器上建立一个group,可以暂时命名为:cq1000 informix, Save Set 为:INFORMIX:/cq1000/rootdbs Command 为:nsrnmi 手工启动该group,看是否能成功备份。
jekky 回复于:2004-02-04 13:34:12
|
根据客户的实际情况,建立一个临时的备份策略。 | 在总体测试的时候,再制定永久的备份策略。 16 Uninstalling NetWorker Module for Informix To uninstall a NetWorker Module: 1. Log in as root on the system running Dynamic Server. 2. Issue the following command to shut down the NetWorker daemons: # nsr_shutdown 3. Issue the following command to remove NetWorker Module for Informix: # nmi_ize -r 4. Edit the $INFORMIXDIR/etc/$ONCONFIG script and comment out the following lines: #BAR_BSA_LIB #ISM_DATA_POOL DBMIData #ISM_LOG_POOL DBMILogs 5. Restart the NetWorker daemons once the NetWorker Module software is removed. 6. Use the NetWorker Administration GUI to delete the NMIData and NMILogs volume pools and label templates. 17 Uninstalling the NetWorker Software Use the swremove utility command to uninstall individual NetWorker packages or all of the NetWorker packages at the same time. Note: Like swinstall, swremove can be run in either terminal mode or from the graphical user interface. To uninstall the NetWorker software: 1. Log in as root on the NetWorker computer. 2. Shut down the NetWorker daemons by running the following command: # nsr_shutdown 3. Enter the following command at the shell prompt: # swremove & 4. Select the NetWorker software to be removed in the Software Selection window. 5. Select Remove from the Actions window to run an analysis of the Remove operation. When the Status attribute displays Ready, the analysis is finished. 6. Click Logfile to check for any error or warning messages. Fix any problems before continuing with the operation. 7. Click OK in the Remove Analysis window to proceed with the remove operation. The Remove window appears showing the status of the removal operation. The Status field displays Completed when the software uninstall is finished. 8. To exit from the swremove utility, click Done in the Remove window, and then select Exit from the File menu in the Software Selection window. After the remove operation, verify that all the files have been uninstalled from the networker subdirectory in the /opt/networker directory.
jekky 回复于:2004-02-04 13:36:04
|
这可是我的辛苦工作的日志 |
希望能和研究legato数据备份的同志们 共同提高! |