免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5425 | 回复: 4

如何用NBU备份db2的归档日志 [复制链接]

论坛徽章:
0
发表于 2008-10-18 22:51 |显示全部楼层
想用NBU的出口程序备份DB2的归档?不知道怎么来实现,Veritas的文档写的不是很详细。\r\n\r\n设置了如下:\r\ndb2 update db cfg for sample using userexit on 启用用户出口 \r\n\r\ndb2 update db cfg for sample using logretain on 启用归档日志 \r\n\r\n在NBU里面做了个policy叫db2_standard,是不是就可以了,\r\n怎么知道它是不是能正常工作,好像这个policy 没有办法手工执行测试?\r\nbp.conf文件如下:\r\n\r\n# $Header: db2.conf,v 1.5 2007/04/12 14:05:29 $\r\n#\r\n# ***************************************************************************\r\n# * $Copyright: Copyright 1993 - 2007 Symantec Corporation, All Rights Reserved $ *\r\n# ***************************************************************************\r\n#\r\n# The following settings are used by NetBackup to backup/restore a DB2 database.\r\n#\r\n# Reminders:\r\n# 1) The specified policy must have a type of \"DB2\".\r\n# 2) The specified schedule must be defined for this policy.\r\n# 3) The DB2 database host must be entered as a client for this policy.\r\n#\r\n\r\nDATABASE SAMPLE\r\nOBJECTTYPE DATABASE\r\nPOLICY DB2\r\nSCHEDULE Default-Application-Backup\r\nENDOPER\r\n\r\n#\r\n# The following settings are used by NetBackup to backup/restore DB2 log files.\r\n#\r\n Reminders:\r\n# 1) DB2 transcation logs can be backed up/restored using  either \r\n#  (a) DB2 User Exit Program\r\n#       The specified policy must have a type of \"Standard\" (for UNIX DB2 \r\n#       host) or \"MS-Windows-NT\" (for Windows DB2 host).\r\n#\r\n#  (b) LOGARCHMETH1 can be configured to use NetBackup.\r\n#      (When LOGARCHMETH1 = \"VENDOR:NetBackup for DB2 agent\")\r\n#       This option is possible only for versions 8.2 and above.\r\n#       The specified policy must have a type of DB2.\r\n#\r\n# 2) The specified schedule must be defined for this policy.\r\n# 3) The DB2 database host must be entered as a client for this policy.\r\n#\r\n\r\n# ---------------------\r\n# DB2 User Exit Program\r\n# ---------------------\r\n# If DB2 log file archiving is enabled (DB2 USEREXIT ON), DB2 will invoke\r\n# the NetBackup user-exit program to backup & restore DB2 archive log files.\r\n# Using ARCFUNC SAVE causes log files to be archived to NetBackup storage,\r\n# as specified by the policy storage-unit setting.\r\n# Using ARCFUNC COPY causes log files to be archived to a disk directory.\r\n# Use ARCDIR to specify the destination directory for log file backup.\r\n# Use RETDIR to specify the source directory for log file restore.\r\n#\r\nDATABASE SAMPLE\r\nOBJECTTYPE ARCHIVE\r\nPOLICY db2_standard\r\nSCHEDULE userexit\r\nARCFUNC SAVE\r\n#ARCFUNC COPY\r\n#ARCDIR /home/db2inst1/arcdir\r\n#RETDIR /home/db2inst1/arcdir\r\nENDOPER

论坛徽章:
0
发表于 2008-10-19 21:55 |显示全部楼层
还需要文档多全啊,呵呵,看这个注释就够了

论坛徽章:
0
发表于 2008-10-20 10:46 |显示全部楼层
出了什么问题?怎么解决的

论坛徽章:
2
2015年迎新春徽章
日期:2015-03-04 09:49:45IT运维版块每日发帖之星
日期:2016-07-29 06:20:00
发表于 2008-10-20 13:19 |显示全部楼层
我记得 备份的时候用一个“include log”,就可以顺便备份log,不用单独备份,restor的时候可以先提取出log。

论坛徽章:
0
发表于 2008-11-03 18:18 |显示全部楼层

回复 #6 冬瓜头 的帖子

手工编译db2uexit可以自动归档到NBU的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP