分类: DB2/Informix
2008-05-31 17:21:49
监视和调试备份和恢复过程
在使用 ontape 时,只能监视控制台和日志消息。
OnBar 实用程序为监视和调试备份和恢复操作提供了更多选项。可以监视 BAR_ACT_LOG 和 BAR_DEBUG_LOG 指定的日志,还可以设置其他配置参数。
BAR_PERFORMANCE
这个新特性可以报告 OnBar 备份和恢复的性能。可以使用新的配置参数 BAR_PERFORMANCE 设置写入 OnBar 活动日志的报告级别。可以让报告包含 OnBar 活动的次秒级(sub-second)时间戳,OnBar 和存储管理器以及 OnBar 和 IDS 实例之间的传输速率。
要想显示 IDS 实例和存储管理器之间传输数据花费的时间,就将这个参数设置为 1。
要想显示次秒级精度的时间戳,就将这个参数设置为 2。
要想同时显示时间戳和传输统计数据,就将这个参数设置为 3。
BAR_PROGRESS_FREQ
以分钟为单位指定备份或恢复消息在活动日志中出现的频率。
在调试 OnBar 的问题时,最有价值的工具是 BAR_ACT_LOG 和 BAR_DEBUG_LOG。将 BAR_DEBUG 设置为 9,就会开始跟踪 OnBar 和 XBSA 调用,并在 BAR_DEBUG_LOG 生成消息,可以使用这些消息了解哪些调用失败了,或者返回遇到的错误。
可以以 ontape(Standalone)和 onbar(Integrated)模式使用 archecker 实用程序:
archecker 实用程序无法检查逻辑日志备份。archecker 实用程序不执行恢复。
设置 archecker 并不复杂,但是需要创建一个 archecker 配置文件:
运行 archecker 的步骤如下:
应该会看到下面这样的输出。
Program Name: archecker Version: 8.0 Released: 2007-04-19 23:00:58 CSDK: IBM Informix CSDK Version 2.91 ESQL: IBM Informix-ESQL Version 2.91.UN220 Compiled: 04/19/07 23:01 on SunOS 5.9 Generic_118558-28 AC_STORAGE /space/products/v11.Beta.6/arch_storage AC_MSGPATH /home/informix/ac_msg.log AC_VERBOSE on AC_TAPEDEV /space/TAPE/v11backup/ AC_TAPEBLOCK 32 KB AC_LTAPEDEV /space/TAPE/v11backup/ AC_LTAPEBLOCK 32 KB AC_TIMEOUT 300 AC_SESSION Archive file /space/TAPE/v11backup/blazer_110_L0 Tape type: Archive Backup Tape OnLine version: IBM Informix Dynamic Server Version 11.10.UB6TL Archive date: Sun May 6 15:29:41 2007 Archive level: 0 Tape blocksize: 32768 Tape size: 2147483647 Tape number in series: 1 Scan PASSED Control page checks PASSED Reserve page validation PASSED Checking rootdbs:TBLSpace Checking sysmaster:sysdatabases Checking sysmaster:systables ....... ....... Table checks PASSED Tables/Fragments validated: 293 Archive Validation PASSED. |
ontape 和 OnBar 都支持外部备份和恢复。
在操作系统级执行数据备份的方法如下:
在外部备份期间,必须使用 onmode -c block 命令阻塞数据库服务器。OnBar 和 ontape 的外部备份/恢复特性都支持逻辑复原。
优点
缺点
To set up ISM to run on UNIX, follow these steps: 1. Log in as informix to the machine where your engine is installed. Set up your environment to use the engine. 2. Create a directory in which to store the savesets for logical log backup. This step is only needed if you want to be able to save storage spaces or logical logs to files. 3. In the ONCONFIG configuration file of the engine, specify the volume pool names for storage spaces and logical logs by adding the following: ISM_DATA_POOL datapool ISM_LOG_POOL logpool datapool If you are going to archiving your storage spaces to tape devices then use the value ISMData here. If you are going to archiving your storage spaces to files then use the value ISMDiskData here. logpool If you are going to be backing up your logical logs to tape devices then use the value ISMLogs here. If you are going to be backing up your logical logs to files then use the value ISMDiskLogs here. Example: These parameters are for a system where devices will be used to archive storage spaces but the logical logs will be backed up to files. ISM_DATA_POOL ISMData ISM_LOG_POOL ISMDiskLogs 4. Set the LTAPEDEV parameter in the ONCONFIG file to anything but /dev/null. 5. Log in as root. Set up your environment to use the engine. 6. From the command line type: ism_startup -init 7. Add user informix as an administrator by using the ism_add command with the following syntax: ism_add -admin informix@machine_name machine_name Host machine name. The name should be the fully qualified name for the machine of which include the domain name. 8. Add the storage devices to the ISM server by using the ism_add command with the following syntax: ism_add -device device_name -type Media_type_name device_name Full path to the device. media_type_name Type of media used by the storage device. Check ISM user guide for list of valid devices. Example: This command adds an 8mm DAT as a storage device. The device is located at /dev/rmt/0mn in the file system. ism_add -device /dev/rmt/0mn -type 8mm This command adds the directory /tmp/logfiles.bak as a storage device. ism_add -device /tmp/logfiles.bak -type file 9. Label the devices by using the ism_op command with this syntax: ism_op -label device_name -volume volume_name -pool pool_name device_name Full path name to the device. pool_name The name of the volume pool to which the storage volume will belong. You must assign at least one device to each volume pool that you used in step 3. volume_name Volume name. Any descriptive name for this volume. Examples: This command labels the device /dev/rmt/0mn with a volume name of ISMData and puts it in the pool ISMData. ism_op -label /dev/rmt/0mn -pool ISMData -volume ISMData This command labels the directory /tmp/logfiles.bak with a volume name of ISMLogs and puts it in the pool ISMDiskLogs. ism_op -label /tmp/logfiles.bak -pool ISMDiskLogs -volume ISMLogs 10. Mount the devices by using ism_op command with this syntax: ism_op -mount device_name device_name Full path name to the device. Example: To mount the device /dev/rmt/0mn use this command: ism_op -mount /dev/rmt/0mn To mount the device /tmp/logfiles.bak use this command: ism_op -mount /tmp/logfiles.bak The set up is complete. Test the backup and restore using onBar commands. |
现在,您应该已经掌握了本教程讨论的内容: