操作系统和informix数据库全部损坏恢复测试(不同机器之间)

http://tonykorn97.itpub.net/post/6414/458421

此时我们测试一下在一台机器上做备份到另外一台机器上恢复的过程。


1,安装操作系统,数据库,networker
2, 在test05服务器上做备份,然后放到test07上面恢复

3,此时磁带机的状态为:
[root@test07 root]# nsrmm -m
nsrmm: RAP error: 4mm tape test05.01 not in media index
[root@test07 root]# mminfo -m
mminfo: no matches found for the query
[root@test07 root]# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=1, partition=0.
Tape block size 0 bytes. Density code 0x26 (DDS-4 or QIC-4GB).
Soft error count since last status=0
General status bits on (1010000):
ONLINE IM_REP_EN
[root@test07 root]#


4,scanner重建磁带媒体和索引信息
提示信息:
[root@test07 root]# scanner -i /dev/nst0
scanner: scanning 4mm tape test05.01 on /dev/nst0
scanner: adding 4mm tape test05.01 to pool DBMIData
scanner: (ssid 4293453817) Can't open session for client test05 to index service on test07
scanner: File index error: `test05' is not a registered client
scanner: write failed, 断开的管道
scanner: ssid 4293453817: scan complete
scanner: ssid 4293453817: 4031 KB, 1 file(s)


5,在test07上面增加test05的client,重新scanner
[root@test07 root]# scanner -i /dev/nst0
scanner: scanning 4mm tape test05.01 on /dev/nst0
scanner: 4mm tape test05.01 already exists in the media index
scanner: ssid 4293453817: scan complete
scanner: ssid 4293453817: 4031 KB, 1 file(s)
scanner: ssid 4276676602: scan complete
scanner: ssid 4276676602: 63 KB, 1 file(s)
scanner: ssid 4259899387: scan complete
scanner: ssid 4259899387: 63 KB, 1 file(s)
scanner: ssid 4243122171: scan complete
scanner: ssid 4243122171: 63 KB, 1 file(s)
scanner: ssid 4226344957: scan complete
scanner: ssid 4226344957: 63 KB, 1 file(s)


6,此时可以加载磁带信息:
[root@test07 root]# nsrmm -m
4mm tape test05.01 mounted on /dev/nst0, write protected
[root@test07 root]# watch
volume written (%) expires read mounts capacity
test05.01 17 MB 2% 2009?ê03??28è? 0 KB 1 1100 MB
Current tape test05.01 MB is used!
[root@test07 root]#


7,recover恢复文件
[root@test07 root]# recover /home/informix/etc/
/home/informix/etc not in index
will exit.
Enter directory to browse:
[root@test07 root]#


8,用其他方式恢复
[root@test07 informix]# recover -S 3857382863
Recovering files into their original locations.
./ixbar.0
./oncfg_ontest01.0
./test01.cfg
Received 4 matching file(s) from NSR server `test07'
Recover completion time: Thu Mar 27 10:56:30 2008
[root@test07 informix]#


9,onbar -r恢复测试:

出错,日志信息:
2008-03-27 10:57:27 17576 17574 No such file or directory
2008-03-27 10:57:28 17576 17574 /home/informix/bin/onbar_d -r
2008-03-27 10:57:28 17576 17574 (-43075) Unable to open file /home/informix/etc/sm_versions .
No such file or directory
2008-03-27 10:57:28 17576 17574 /home/informix/bin/onbar_d complete, returning 142 (0x8e)


10,修改过sm_versions后重新恢复,出错,日志信息:
2008-03-27 10:59:18 17593 17591 /home/informix/bin/onbar_d -r
2008-03-27 10:59:19 17593 17591 Successfully connected to Storage Manager.
2008-03-27 10:59:19 17593 17591 XBSA Error: (BSAGetObject) Backup object does not exist in Storage Manager.
2008-03-27 10:59:19 17593 17591 Object information: bar_objdesc
obj_id 0 obj_name 'rootdbs' obj_type 'R' act_id 0 act_type 2 act_status 0
act_start '2008-03-27 10:59:19' act_end '2008-03-27 09:52:05'
ins_time 0 rsam_time 80214 seal_time 1206582725 prev_seal_time 1206446260 level 0 copyid hi:lo 1206582725:1206582726 req_act_id 15
logstream 0 est_pages hi:lo 0:0 first_log 9 chpt_log 9 last_log 0
partial_flag 0 do_query 0 ins_sm_id 0 ins_sm_name ''
ins_verify 0 ins_verify_date '' restore order 0:0
objInfo ''
retry 0 in_catalog 1 in_bootfile 0 child_pid 0 child_state 0
bkup_host ''
2008-03-27 10:59:19 17593 17591 (-43260) ON-Bar was unable to get backup record of rootdbs from storage manager.
2008-03-27 10:59:19 17593 17591 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 10:59:19 17593 17591 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 10:59:19 17593 17591 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 10:59:19 17593 17591 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 10:59:19 17593 17591 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 10:59:24 17593 17591 (-43140) Due to the previous error, logical restore will not be attempted.
2008-03-27 10:59:24 17593 17591 /home/informix/bin/onbar_d complete, returning 131 (0x83)
~


11,删除networker
12,更改服务器主机名
13,重新启动服务器
14,然后重新安装networker


15,重新scanner
[root@test07 root]# scanner -i /dev/nst0


[root@test05 installfiles]# nsrmm -m
4mm tape test05.01 mounted on /dev/nst0, write protected
[root@test05 installfiles]# watch
volume written (%) expires read mounts capacity
test05.01 17 MB 2% 2009?ê03??28è? 0 KB 1 1100 MB
Current tape test05.01 MB is used!

16,此时可以用recover恢复
[root@test05 installfiles]# recover /home/informix/etc
recover: Current working directory is /home/informix/etc/
recover> ls
ixbar.0 oncfg_ontest01.0 test01.cfg
recover> add ixbar.0
1 file(s) marked for recovery
recover> add oncfg-ontest01.0
recover: oncfg-ontest01.0 not in index
1 file(s) marked for recovery
recover> add test01.cfg
2 file(s) marked for recovery
recover> recover
recover: Total estimated disk space needed for recover is 20 KB.
Recovering 2 files into their original locations
Volumes needed (all on-line):
test05.01 at /dev/nst0
Requesting 2 file(s), this may take a while...
./ixbar.0
./ixbar.0 file exists, overwrite (n, y, N, Y) or rename (r, R) [n]? y
overwriting ./ixbar.0
./test01.cfg
./test01.cfg file exists, overwrite (n, y, N, Y) or rename (r, R) [y]? y
overwriting ./test01.cfg
Received 2 file(s) from NSR server `test05'
Recover completion time: Thu Mar 27 17:45:38 2008
recover> quit
[root@test05 installfiles]#

17,onbar恢复还是不行:
2008-03-27 17:45:49 1860 1858 /home/informix/bin/onbar_d -r
2008-03-27 17:45:49 1860 1858 Successfully connected to Storage Manager.
2008-03-27 17:45:58 1860 1858 Begin cold level 0 restore rootdbs (Storage Manager copy ID: 1206582725 1206582726).
2008-03-27 17:50:53 1860 1858 Unable to write storage space restore data to the database server: .
2008-03-27 17:50:53 1860 1858 (-43391) Skipped backup/restore of space 'rootdbs'.
2008-03-27 17:50:53 1860 1858 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 17:50:53 1860 1858 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 17:50:53 1860 1858 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 17:50:53 1860 1858 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 17:50:53 1860 1858 Unable to start the storage space restore: Archive API error: already open.
2008-03-27 17:50:58 1860 1858 (-43140) Due to the previous error, logical restore will not be attempted.
2008-03-27 17:50:58 1860 1858 /home/informix/bin/onbar_d complete, returning 131 (0x83)
~


18,informix日志信息:
17:46:05 IBM Informix Dynamic Server Version 10.00.UC4 Software Serial Number AAA#B000000
17:46:05 listener-thread: err = -930: oserr = 0: errstr = test07: Cannot connect to database server (test07).

17:46:05 sql_listener: ASF_LISTEN failed

17:46:05 Attempting to bring listener thread down.

17:46:05 Server stopped.

17:46:05 IBM Informix Dynamic Server Stopped.

17:46:05 mt_shm_remove: WARNING: may not have removed all/correct segments

19,修改sqlhosts文件.

20, 重新恢复正常。

21,上面恢复说明一个问题,恢复的时候可以在两台机器之间进行,两台机器之间的ip可以不同,但是主机名需要相同。

暂时只做了一下这样的备份恢复测试。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/312079/viewspace-245844/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/312079/viewspace-245844/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值