- 论坛徽章:
- 0
|
测试环境为:
informix服务器:
redhat AS4 U2
IDS 10.0
TSM服务器:
Windows XP
TSM Server 5.3.2
# Root Dbspace Configuration
ROOTNAME rootdbs
ROOTPATH /home/informix/rootdbs (ln -s /dev/raw/raw1 /home/informix/rootdbs)
ROOTOFFSET 0
ROOTSIZE 30000
TSM与informix配置如下:
1.修改/usr/informix/etc/sm_version.std
cp sm_version.std sm_version
1|5.2.1|adsm|5.2.1|
2.为/usr/informix/lib下的libtxbsa.so建立连接到ibsad001.so
ln -s libtxbsa.so ibsad001.so
3.修改informix环境变量,加入以下几行
export KAIOOFF=1
export DSMI_CONFIG=/opt/tivoli/tsm/client/api/bin/dsm.opt
export DSMI_DIR=/opt/tivoli/tsm/client/api/bin
export DSMI_LOG=/opt/tivoli/tsm/client/api/bin
4.修改dsm.opt.smp、dsm.sys.smp
cp dsm.opt.smp dsm.opt
cp dsm.sys.smp dsm.sys
dsm.opt
SErvername TSM
dsm.sys
SErvername TSM
COMMMethod TCPip
TCPPort 1500
TCPServeraddress 10.1.1.27
NODEname informix
passwordaccess generate
5.运行/usr/informix/bin/txbsapswd,输入密码
6.修改/usr/informix/etc/alarmprogram.sh
BACKUPLOGS=Y
7.修改/usr/informix/etc/onconfig.cfg
#Log Archive Tape Device
#LTAPEDEV /dev/null
LTAPEDEV /usr/informix/work/log
LTAPEBLK 512
LTAPESIZE 1024000
8.新建work目录和log文件
mkdir /usr/informix/work/log
touch log
chmod 660 /usr/informix/work/log
9.cd /opt/tivoli/tsm/client/api/bin
chmod 777 dsierror.log
10.onmode -ky
11.oninit
在informix上使用dbaccess创建数据库haha
dbaccess > Database > Create > CREATE DATABASE >>haha
>CREATE DATABASE: Dbspace 选择rootdbs
>CREATE DATABASE: Log 选择Log
>Exit>EXIT: Create-new-database
>DATABASE: Select > SELECT DATABASE >>选择haha@server1
>Exit
使用onbar -b -w
查看/usr/informix/bar_act.log内容如下:
2006-12-23 14:37:00 16867 16865 /usr/informix/bin/onbar_d -b -w
2006-12-23 14:37:02 16867 16865 Archive started on rootdbs (Requested Level 0).
2006-12-23 14:37:03 16867 16865 Begin level 0 backup rootdbs.
2006-12-23 14:37:12 16867 16865 Successfully connected to Storage Manager.
2006-12-23 14:37:17 16867 16865 Completed level 0 backup rootdbs (Storage Manager copy ID: 0 2049).
2006-12-23 14:37:17 16867 16865 Archive on rootdbs Completed (Requested Level 0).
2006-12-23 14:37:17 16867 16865 Begin backup logical log 6.
2006-12-23 14:37:26 16867 16865 Successfully connected to Storage Manager.
2006-12-23 14:37:26 16867 16865 Completed backup logical log 6 (Storage Manager copy ID: 0 2050).
2006-12-23 14:37:27 16949 16932 /usr/informix/bin/onbar_d -b -l
2006-12-23 14:37:27 16867 16865 /usr/informix/bin/onbar_d complete, returning 0 (0x00)
2006-12-23 14:37:29 16949 16932 /usr/informix/bin/onbar_d complete, returning 0 (0x00)
TSM服务器状态:
使用query session在备份过程中刷屏看见备份的数据量共有6M
使用query content查看卷结果如下:
节点名 Type 文件空间名 FSID 文件的客户名
INFORMIX 备份 /server1 1 /server1/rootdbs/ 0
INFORMIX 备份 /server1 1 /server1/0/ 6
现在删除刚刚建立的数据库haha
dbaccess > Database > Create > Drop > DROP DATABASE >>选择haha@server1
成功删除数据库haha
使用onmode -k停止数据库
使用onbar -r -w恢复
查看/usr/informix/bar_act.log内容如下:
2006-12-23 14:53:25 16996 16994 /usr/informix/bin/onbar_d -r -w
2006-12-23 14:53:30 16996 16994 Successfully connected to Storage Manager.
2006-12-23 14:53:30 16996 16994 Begin salvage for log 7.
2006-12-23 14:53:30 16996 16994 Completed salvage of logical log 7 (Storage Manager copy ID: 0 2051).
2006-12-23 14:53:35 16996 16994 Successfully connected to Storage Manager.
2006-12-23 14:53:35 16996 16994 Begin cold level 0 restore rootdbs (Storage Manager copy ID: 0 2049).
2006-12-23 14:53:48 16996 16994 Completed cold level 0 restore rootdbs.
2006-12-23 14:53:49 16996 16994 Completed whole system restore.
2006-12-23 14:53:56 16996 16994 Successfully connected to Storage Manager.
2006-12-23 14:53:56 16996 16994 Begin restore logical log 6 (Storage Manager copy ID: 0 2050).
2006-12-23 14:53:57 16996 16994 Completed restore logical log 6.
2006-12-23 14:53:57 16996 16994 Begin restore logical log 7 (Storage Manager copy ID: 0 2051).
2006-12-23 14:53:57 16996 16994 Completed restore logical log 7.
2006-12-23 14:54:02 16996 16994 Completed logical restore.
2006-12-23 14:54:04 16996 16994 /usr/informix/bin/onbar_d complete, returning 0 (0x00)
2006-12-23 14:54:04 17037 17035 /usr/informix/bin/onbar_d -b -l
2006-12-23 14:54:05 17037 17035 /usr/informix/bin/onbar_d complete, returning 0 (0x00)
TSM服务器状态:
使用query content查看卷结果如下:
节点名 Type 文件空间名 FSID 文件的客户名
INFORMIX 备份 /server1 1 /server1/rootdbs/ 0
INFORMIX 备份 /server1 1 /server1/0/ 6
INFORMIX 备份 /server1 1 /server1/0/ 7
使用onstat -
informix状态为
IBM Informix Dynamic Server Version 10.00.UC3R1 -- Quiescent -- Up 00:03:11 -- 28228 Kbytes
使用onmode -ky
使用oninit
现在informix状态为
IBM Informix Dynamic Server Version 10.00.UC3R1 -- On-Line -- Up 00:00:17 -- 28228 Kbytes
使用dbaccess > Database > Info
没有出现之前创建的haha@server1
问题:
1.这样是测试备份恢复的方法是否正确?如果不正确,麻烦告知正确测试方法,不胜感激!
2.为什么用onbar -b -w备份到TSM服务器的数据量这么少,只有6M?
3.为什么使用onbar -r -w恢复后不能恢复之前的haha数据库?
[ 本帖最后由 IntOThERaiN_CN 于 2006-12-24 15:24 编辑 ] |
|