免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4350 | 回复: 2
打印 上一主题 下一主题

关于onbar时间点恢复的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-07-21 17:43 |只看该作者 |倒序浏览
本帖最后由 flyinweb_cu 于 2010-07-21 17:45 编辑

环境:AS4U7 + Informix Dynamic Server 2000 Version 9.21.UC2 (虚拟机)
模拟一个场景:在一次onbar 0级备份之后,操作了数据库,现在想恢复到0级备份之前的一个时间点时的数据,或者是在误操作之后,想恢复到之前的状态

[root@informix etc]# cat ixbar.0
online_db         rootdbs            R  0 1     0 1911863244 0          2010-07-21 16:36:09 1     0     0           1     0     - -
online_db         logdbs             CD 0 2     0 1911863245 0          2010-07-21 16:36:12 1     0     0           2     0     - -
online_db         phydbs             CD 0 3     0 1911863247 0          2010-07-21 16:36:13 1     0     0           3     0     - -
online_db         datadbs            ND 0 4     0 1911863246 0          2010-07-21 16:36:13 1     0     0           4     0     - -
online_db         idxdbs             ND 0 5     0 1911863248 0          2010-07-21 16:36:13 1     0     0           5     0     - -
online_db         13                 L  0 6     0 1911863249 0          2010-07-21 16:37:04 1     0     0           6     0     - -
online_db         rootdbs            R  0 7     0 1911863250 0          2010-07-21 17:01:49 1     0     0           7     0     - -
online_db         logdbs             CD 0 8     0 1911863251 0          2010-07-21 17:01:51 1     0     0           8     0     - -
online_db         phydbs             CD 0 9     0 1911863252 0          2010-07-21 17:01:52 1     0     0           9     0     - -
online_db         idxdbs             ND 0 10    0 1911863253 0          2010-07-21 17:01:52 1     0     0           10    0     - -
online_db         datadbs            ND 0 11    0 1911863254 0          2010-07-21 17:01:52 1     0     0           11    0     - -
online_db         14                 L  0 12    0 1911863255 0          2010-07-21 17:02:44 1     0     0           12    0     - -

bar_act.log日志如下:
2010-07-21 17:09:16 4990  4988 /home/informix/bin/onbar_d -r -t 2010-07-21 16:37:04
2010-07-21 17:09:16 4990  4988 Storage space datadbs is not down so it will not be restored.
2010-07-21 17:09:16 4990  4988 Storage space idxdbs is not down so it will not be restored.
2010-07-21 17:09:16 4990  4988 Storage space logdbs is not down so it will not be restored.
2010-07-21 17:09:16 4990  4988 Storage space phydbs is not down so it will not be restored.
2010-07-21 17:09:16 4990  4988 Storage space rootdbs is not down so it will not be restored.
2010-07-21 17:09:16 4990  4988 There are no storage spaces/logical logs to backup/restore.
2010-07-21 17:09:16 4990  4988 /home/informix/bin/onbar_d complete, returning 147 (0x93)

官方一篇文章
http://www-01.ibm.com/support/do ... en&rss=ct630db2
IC50716: RESTORE FAILS WITH "THERE ARE NO STORAGE SPACES/LOGICAL LOGS TO BACKUP/RESTORE"
APAR statusClosed as program error.
Error descriptionStarting with version 10 time lines were created for restore.
The time line uses the UNIX time as a sequence on when the
objects were "sealed", that is, the archive checkpoint time
for dbspaces and the closing time for logical logs. If logs are
not automatically backed up and the system clock is changed,
the time line will get corrupted. Logical logs that were closed
before the archive checkpoint time will have a "seal-time"
higher than the archive checkpoint time and so they will be
required to be restore. Because the dbspace does not need this
log it will jump to the backup immediately before the
one wanted. If one cannot be found, it will fail with:
"There are no storage spaces/logical logs to backup/restore"

Local fixModify the ixbar so that only the logs that were active when the
backup was taken are in the files

Problem summary****************************************************************
USERS AFFECTED:
10.00.xC1 and above
****************************************************************
PROBLEM DESCRIPTION:
Starting with version 10 time lines were created for restore.
The time line uses the UNIX time as a sequence on when the
objects  were "sealed",  that is:
- The archive checkpoint time for dbspaces or
- The closing time for logical logs.
If logs are not automatically backed up and the system clock is
changed to a time in the past, the time line will get corrupted
and therefore restore will be impossible. The typical error you
will see is:
    "There are no storage spaces/logical logs to
backup/restore"
****************************************************************
RECOMMENDATION:
Upgrade to IDS version 10.00.xC7
****************************************************************

Problem conclusionProblem was first fixed in IDS 10.00.xC7

不知上面的情景是不是这个问题?

论坛徽章:
11
金牛座
日期:2015-03-19 16:56:22数据库技术版块每日发帖之星
日期:2016-08-02 06:20:00数据库技术版块每日发帖之星
日期:2016-04-24 06:20:00数据库技术版块每日发帖之星
日期:2016-04-13 06:20:00IT运维版块每日发帖之星
日期:2016-04-13 06:20:00数据库技术版块每日发帖之星
日期:2016-02-03 06:20:00数据库技术版块每日发帖之星
日期:2015-08-06 06:20:00季节之章:春
日期:2015-03-27 15:54:57羊年新春福章
日期:2015-03-27 15:54:37戌狗
日期:2015-03-19 16:56:41数据库技术版块每日发帖之星
日期:2016-08-18 06:20:00
2 [报告]
发表于 2010-07-21 21:25 |只看该作者
本帖最后由 liaosnet 于 2010-07-21 21:27 编辑

你这里是在online状态下恢复的.....需在冷恢复~~

在这里
Storage space rootdbs is not down so it will not be restored.
提示dbspace 不是down的.不能恢复...也许dbspace down也能时间点恢复..

论坛徽章:
0
3 [报告]
发表于 2010-07-22 09:05 |只看该作者
楼上正解!

2010-07-22 08:34:47 9477  9475 /home/informix/bin/onbar_d -r -p -t 2010-07-21 16:37:04
2010-07-22 08:37:27 9477  9475 Successfully connected to Storage Manager.
2010-07-22 08:37:27 9477  9475 Begin cold level 0 restore rootdbs (Storage Manager copy ID: 1911863244 0).
2010-07-22 08:37:39 9477  9475 Completed cold level 0 restore rootdbs.
2010-07-22 08:37:39 9502  9477 Process 9502  9477 successfully forked.
2010-07-22 08:37:39 9502  9477 Successfully connected to Storage Manager.
2010-07-22 08:37:39 9503  9477 Process 9503  9477 successfully forked.
2010-07-22 08:37:39 9503  9477 Successfully connected to Storage Manager.
2010-07-22 08:37:39 9504  9477 Process 9504  9477 successfully forked.
2010-07-22 08:37:39 9504  9477 Successfully connected to Storage Manager.
2010-07-22 08:37:39 9505  9477 Process 9505  9477 successfully forked.
2010-07-22 08:37:39 9505  9477 Successfully connected to Storage Manager.
2010-07-22 08:37:40 9502  9477 Begin cold level 0 restore logdbs (Storage Manager copy ID: 1911863245 0).
2010-07-22 08:37:41 9505  9477 Begin cold level 0 restore idxdbs (Storage Manager copy ID: 1911863248 0).
2010-07-22 08:37:42 9502  9477 Completed cold level 0 restore logdbs.
2010-07-22 08:37:42 9502  9477 Process 9502  9477 completed.
2010-07-22 08:37:44 9505  9477 Completed cold level 0 restore idxdbs.
2010-07-22 08:37:44 9505  9477 Process 9505  9477 completed.
2010-07-22 08:37:50 9504  9477 Begin cold level 0 restore datadbs (Storage Manager copy ID: 1911863246 0).
2010-07-22 08:37:51 9503  9477 Begin cold level 0 restore phydbs (Storage Manager copy ID: 1911863247 0).
2010-07-22 08:37:53 9504  9477 Completed cold level 0 restore datadbs.
2010-07-22 08:37:54 9504  9477 Process 9504  9477 completed.
2010-07-22 08:37:54 9503  9477 Completed cold level 0 restore phydbs.
2010-07-22 08:37:54 9503  9477 Process 9503  9477 completed.
2010-07-22 08:37:54 9477  9475 Physical restore complete. Logical restore required before work can
continue.
2010-07-22 08:37:54 9477  9475 /home/informix/bin/onbar_d complete, returning 0 (0x00)
2010-07-22 08:55:34 9528  9526 /home/informix/bin/onbar_d -r -l -t 2010-07-21 16:37:04
2010-07-22 08:55:35 9528  9526 Successfully connected to Storage Manager.
2010-07-22 08:55:35 9528  9526 Begin restore logical log 13 (Storage Manager copy ID: 1911863249 0).
2010-07-22 08:55:53 9528  9526 Completed restore logical log 13.
2010-07-22 08:55:53 9528  9526 Begin restore logical log 14 (Storage Manager copy ID: 1911863256 0).
2010-07-22 08:55:54 9528  9526 Completed restore logical log 14.
2010-07-22 08:55:55 9528  9526 Begin restore logical log 15 (Storage Manager copy ID: 1911863258 0).
2010-07-22 08:55:56 9528  9526 Completed restore logical log 15.
2010-07-22 08:56:02 9528  9526 Completed logical restore.
2010-07-22 08:56:03 9543  9541 /home/informix/bin/onbar_d -b -l
2010-07-22 08:56:04 9543  9541 /home/informix/bin/onbar_d complete, returning 0 (0x00)
2010-07-22 08:56:07 9528  9526 /home/informix/bin/onbar_d complete, returning 0 (0x00)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP