开始新对话

此帖子已超过 5 年

Solved!

Go to Solution

8645

2013年8月18日 21:00

networker8.0备份模块请教

​大家好!neworke8.0用的是什么备份模块?NMDA?还是和7.6.1使用的备份ORACLE使用NMO5.0 ,备份DB2使用NMDB2,备份INFORMIX使用NMI, 下载了NW8.0做测试用,使用7.6.1的备份INFORMX模块NMI3.0,配置的步骤方法与7.6.1中的NMI完全一致,但是就是报错,无法备份,请教一下大家NW8.0是使用了NMDA模块吗? 能否提供一个NMDA比较详细的文档?我装了个NMDA1.2来备份DB2,客户机配置按照向导一步一步的做,能够备份,但是无法恢复!恢复过程中不读磁带,恢复语句:db2 "restore db testdb load /usr/lib/libnsrdb2.so options @/db2/nmda_db2.cfg taken at 20130818063413",NMC界面上提示test主机正在浏览,但是很长时间都不读取磁带。​

1.jpg

2.jpg3.jpg

258 消息

2013年8月20日 03:00


谢谢Tim Quan一直以来对本贴子的关注,昨天是在一台存储节点上做的测试,存储节点连接了一个带库,用mhvtl 模拟的,这台存储节点装了DB2,恢复的时候估计有点问题,今天没在这台存储节点上做测试,换成了我前段时间做的双机,今天上午经过重新安装测试,总算成功了,现在把详细的过程跟大家分享下:

由于我现在维护的networker生产系统里有informx和oracle的备份,没有DB2和SYBASE的备份,我想自己先整个测试环境使用networker来备份恢复DB2,环境如下:

用虚拟机装的两台rhel6.3 ,使用双机软件vcs6.0.1配置成双机互备,node1上运行ORALE11G,noe2 上运行DB29.7,操作系统和软件都是64位,双机经过安装测试能够完成资源的切换,模拟故障也能实现资源互换,另外运行一台CentOS5.2做为备份服务器,node1和node2上安装必须的networker软件,并把node1和node2配置成存储节点,具体配置大家比较清楚,在NMC上配置池,组,调度时间表,向池里标签磁带,这些准备工作准备完毕后,开始配置DB2

1、DB2主机上安装了NMDA1.0 x64位,先把/nsr/apps/config/nmda_db2.cfg拷贝到/db2目录下,并赋予相应的权限

2 、进入db2目录下,修改里面参数:我修改的如下:

DB2_NODE_NAME = db2inst1

DB2INSTANCE = db2inst1

DB2_USER = db2inst1

INSTHOME = /home/db2inst1

DB2_ALIAS = TESTDB

DB2_OPTIONS = DB2_BACKUP_DB,DB2_BACKUP_FULL,DB2BACKUP_ONLINE,DB2BACKUP_INCLUDE_LOGS

DB2_VENDOR_LIB_PATH = /usr/lib/libnsrdb2.so

DB2_SESSIONS = 2

NSR_CLIENT = node-db2

NSR_DATA_VOLUME_POOL = db2back

NSR_LOG_VOLUME_POOL =  db2back

NSR_SERVER = bkserver

NSR_DEBUG_LEVEL = 3

USER_PSWD=lc5oizv9

修改完毕后,其中USER_PSWD=lc5oizv9这个是使用nsrdaadmin -P -z nmda_db2.cfg来生成的db2数据库管理员的加密密码,不设这个备份不成功,提示MISS PASSWD的错误。

还需要编辑一个备份,备份归档日志,编辑/db2/nmda_db2_tlog.cfg文件添加

NSR_SERVER=bkserver

NSR_LOG_VOLUME_POOL=db2back

3、以db2所以者登录主机执行:

db2 “update db cfg for testdb using vendoropt @/db2/nmda_db2.cfg”

db2 ”update db cfg for testdb using AUTO_DEL_REC_OBJ ON“

db2 "update db cfg for testdb using LOGARCHMETH1 VENDOR:/usr/lib/libnsrdb2.so logarchopt1 @/db2/nmda_db2_tlog.cfg"    //开启DB2的归档,可以在线备份数据库,否则无法在线备份

4、由于开启了归档,此时必须手动执行一个备份使DB2脱离backup pending的状态,这是DB2数据库本身的特性

db2 "backup db testdb to /db2"

5、在NMC上做配置,首先添加node1和node2,这两台是物理主机

5.jpg

6、新建客户机node-db2(虚拟主机名),saveset填写:DB2:/TEDB/NODE0000,DB2数据库一个实例下可以有多个数据库,备份命令填写:nsrdasv -z /db2/nmda_db2.cfg

5.jpg

以上配置完毕后,手动运行db2组,备份成功。

7、恢复测试:

以实例用户登录到node-db2主机,先执行:

db2 "list history backup all  for testdb"  查看备份的时间戳,再执行

db2 "restore db testdb load /usr/lib/libnsrdb2.so options @/db2/nmda_db2.cfg taken at 20130820163258 into testdb"   恢复数据文件

db2 "rollforward db testdb to end of logs and complete"     前滚日志

恢复过程中,查看NMC,发现node1在挂载磁带,读取磁带

8、检查数据,恢复成功

5.jpg

还存在一个问题,在node1上能够完全恢复数据和日志,切换到node2上时,恢复日志有点问题,我再看下是不是哪里设置的有问题,以上请大家指正

2 Intern

 • 

362 消息

2013年8月18日 22:00

这个NMDA模块是有的啊,具体安装我给你详细文档。

1个附件

2 Intern

 • 

3.2K 消息

2013年8月18日 22:00

应该有相应的intergation吧,偶没用过networkerm用的是data protector。应该都是差不多需要做什么Link才能用相应的组件的。

258 消息

2013年8月18日 23:00

我备DB2的时候,没有让做link

2 Intern

 • 

1.2K 消息

2013年8月18日 23:00

NetWorker 8.0既支持NMI 3.0也支持NMDA 1.2NMDA 1.5目前还没有正式发布。

既然你现在已经安装了NMDA 1.2,建议根据NMDA 1.2 Administration Guide来进行InformixDB2的备份和恢复。如果还是不行,请把备份和恢复InformixDB2时的报错信息贴出来,我们再来一起看。

NMDA 1.2 Administration Guide

https://support.emc.com/docu35288_NetWorker_Module_for_Databases_and_Applications_1.2_Administration_Guide.pdf?language=en_US

2 Intern

 • 

1.1K 消息

2013年8月18日 23:00

Networker8.0这个是core的版本更新,它与module的更新并不是直接同步或者关联的。你要备份数据库还是要看NMDA支持那个NW core版本和数据库版本。

NMDA1.5supportsNetWorker (Server, Client and Storage Node) versions 7.6and up

NMDA1.2supportsNetWorker (Serv er, Client and Storage Node) versions 7.5 and up

NMDA1.1supportsNetWorker andOracleStorageTek Enterprise Backup (Server, Client and Storage Node) versions 7.5.xandnewer.

官网上还没提供1.5的下载,不过1.2应该已经能满足目前的需求了。不建议还用NMONMINMDB2,这些已经不支持了。

258 消息

2013年8月19日 00:00

谢谢了,这个安装文档是1.5的,挺详细

258 消息

2013年8月19日 00:00

按文档里的步骤,先把/nsr/apps/config下的nmda_db2.cfg拷贝到其他目录下,我拷贝到了/db2下,并赋予相应的权限,然后打开NMC安装新建客户向导一步一步完成,完成后,启动db2组备份,发现时能够备份成功的,在源主机上做恢复测试:

首先以db2inst1这个用户登录系统,执行 db2 "list history backup all for testdb" 列出要曾经备份过数据库的时间戳:

Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log  Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
  R  D  20130818085400000   F                                               
----------------------------------------------------------------------------

----------------------------------------------------------------------------
    Comment: RESTORE TESTDB WITH RF
Start Time: 20130818085400
   End Time: 20130818085403
     Status: A
----------------------------------------------------------------------------
  EID: 87 Location:

SQLCA Information

sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -2062   sqlerrml: 24

sqlerrmc: /usr/lib/libnsrdb2.so11
sqlerrp : sqluMCIn
sqlerrd : (1) 0                (2) 0                (3) 0
           (4) 0                (5) 0                (6) 0
sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)
           (7)      (8)      (9)      (10)       (11)
sqlstate:

  使用命令做恢复:

db2 "restore db testdb load /usr/lib/libnsrdb2.so options @/db2/nmda_db2.cfg taken at 2013081808500"

报如下错误:

SQL2062N  An error occurred while accessing media "/usr/lib/libnsrdb2.so". 

Reason code: "11".

查找了管理文档给出的解决方法,发现自己设置的都正确,实在找不出哪里有问题,请帮忙看看

/db2/nmda_db2.cfg里的内容如下:

[db2inst1@test db2]$ more nmda_db2.cfg
# #############################################################################
#
# nmda_db2.cfg
#
# All rights reserved.
#
# NetWorker Module for Databases and Applications (NMDA) 1.2
#
# This template is designed to help users configure NMDA DB2 manual backups and
# scheduled backups if the NMC-based configuration wizard is not being used.
# Additional parameters may be added to the file when required.
#
# Check the NMDA administration guide for a complete list of all the supported
# parameters and rules for editing the configuration file.
#
# Make a copy of this file before attempting any modifications.
# To enable a parameter, uncomment or add it and specify its value.
#
# #############################################################################


# #############################################################################
#               MANDATORY PARAMETERS (scheduled backups only)
# #############################################################################

DB2_NODE_NAME = db2inst1
DB2INSTANCE = db2inst1
DB2_USER = db2inst1
#DB2PATH =
INSTHOME = /home/db2inst1

  #
  # DB2_NODE_NAME:   Alias of the DB2 instance to which the user must connect
  #                  for the backup.
  # DB2INSTANCE:     UNIX only. Name (not the alias) of the DB2 instance that
  #                  contains the database to be backed up.
  # DB2_USER:        Name of the DB2 operating system user to run the backup.
  #                  Encrypt the user's password through the following command:
  #                  nsrdaadmin -P -z
  #                  The encryption adds the USER_PSWD parameter to this file.
  # DB2PATH:         Windows only. Pathname where the DB2 binaries are located.
  # INSTHOME:        UNIX only. Pathname where the DB2 binaries are located.


# #############################################################################
#               OPTIONAL PARAMETERS (scheduled backups only)
# #############################################################################

DB2_ALIAS = TESTDB
DB2_OPTIONS = DB2BACKUP_FULL,DB2BACKUP_ONLINE,DB2BACKUP_INCLUDE_LOGS
# DB2_QUIESCE =
DB2_VENDOR_LIB_PATH = /usr/lib/libnsrdb2.so
# DB2_APPLY_NW_LEVELS =
DB2_SESSIONS = 1
# DB2_TBS_LIST =
# NSR_DR_BACKUP_INFO =
# NSR_DR_FILE_LIST =
# PRECMD =
# POSTCMD =

  #
  # DB2_ALIAS:           DB2 alias of the database to be backed up. This alias
  #                      is typically the same as the database name.
  # DB2_OPTIONS:         DB2 keywords, comma-separated, specifying backup
  #                      options: DB2BACKUP_DB, DB2BACKUP_TABLESPACE,
  #                      DB2BACKUP_FULL, DB2BACKUP_INCREMENTAL,
  #                      DB2BACKUP_DELTA, DB2BACKUP_ONLINE, DB2BACKUP_OFFLINE,
  #                      DB2BACKUP_EXCLUDE_LOGS, DB2BACKUP_INCLUDE_LOGS,
  #                      DB2BACKUP_COMPRESS
  # DB2_QUIESCE:         FALSE (default) or TRUE. TRUE specifies to quiesce the
  #                      database during a backup; requires DB2_ALIAS to be
  #                      set.
  # DB2_VENDOR_LIB_PATH: Full pathname of the NMDA DB2 shared library on the
  #                      DB2 host to be used for backup. For example:
  #                      C:\PROGRA~1\Legato\nsr\bin\libnsrdb2.dll
  # DB2_APPLY_NW_LEVELS: FALSE (default) or TRUE. TRUE specifies to use the
  #                      backup level from the NetWorker Schedule resource
  #                      instead of the level defined in DB2_OPTIONS.
  # DB2_SESSIONS:        1 (default). Number of parallel backup sessions to be
  #                      run with the NetWorker server.
  # DB2_TBS_LIST:        Mandatory for a tablespace backup only. Do not set for
  #                      a database backup. List of tablespaces to be backed
  #                      up.
  # NSR_DR_BACKUP_INFO:  FALSE or TRUE(default). TRUE specifies that additional
  #                      DB2 information is backed up for disaster recovery.
  # NSR_DR_FILE_LIST:    Pathname of a file that lists files to back up
  #                      in addition to the database backup.
  # PRECMD:              Full pathname of a command script to be run before a
  #                      scheduled backup. If the PRECMD script fails, the
  #                      backup does not run.
  # POSTCMD:             Full pathname of a command script to be run after a
  #                      scheduled backup. If the POSTCMD script fails, a
  #                      warning message is printed but the backup succeeds.


# #############################################################################
#               OPTIONAL PARAMETERS (scheduled and manual backups)
# #############################################################################

# DB2_PARTITION_LIST =
NSR_CLIENT = test
# NSR_MAX_START_RETRIES =
NSR_DATA_VOLUME_POOL = db2back
NSR_LOG_VOLUME_POOL = db2back
# NSR_AES_ENCRYPTION =
# NSR_COMPRESSION =
# NSR_NWPATH =
#NSR_DIRECT_ACCESS = Yes

  #
  # DB2_PARTITION_LIST:    For DB2 DPF backups only. Keyword all or
  #                        comma-separated integer numbers representing DB2
  #                        nodes to be backed up. A single node is backed up by
  #                        default.
  # NSR_CLIENT:            Hostname of the client that will store the NetWorker
  #                        index entries.
  #                        Set to a virtual host in a cluster or to the same
  #                        host for all nodes in a DB2 DPF environment.
  # NSR_MAX_START_RETRIES: 4 (default). Number of times that NMDA tries to
  #                        start the backup before failing.
  # NSR_DATA_VOLUME_POOL:  Name of the NetWorker pool to store the data backup.
  # NSR_LOG_VOLUME_POOL:   Name of the NetWorker pool to store the backup of
  #                        logs, used in the configuration file specified for
  #                        log archival and retrieval.
  # NSR_AES_ENCRYPTION:    FALSE (default) or TRUE. TRUE specifies to encrypt
  #                        data.
  # NSR_COMPRESSION:       FALSE (default) or TRUE. TRUE specifies to compress
  #                        data.
  # NSR_NWPATH:            Pathname that contains the NetWorker binaries. May
  #                        be needed for Avamar deduplication backups and the
  #                        deletion of snapshot backups using db2acsutil.
  # NSR_DIRECT_ACCESS:     Yes, No or Default (default). Yes enforces the
  #                        Direct File Access(DFA) method. No does not
  #                        attempt DFA at all. Default(recommended) tries
  #                        DFA and falls back to traditional methods if DFA
  #                        cannot be used.

# #############################################################################
#               OPTIONAL PARAMETERS (manual backups only)
# #############################################################################

NSR_SERVER = bkserver
# NSR_SAVESET_BROWSE =
# NSR_SAVESET_RETENTION =
# NSR_DEDUP_BACKUP =
# NSR_DEDUP_NODE =
# NSR_DEVICE_INTERFACE =

  #
  # NSR_SERVER:            NetWorker server hostname. Mandatory for backups to
  #                        a remote NetWorker server.
  # NSR_SAVESET_BROWSE:    Browse policy for the backup. For example: MM/DD/YY.
  # NSR_SAVESET_RETENTION: Retention policy for the backup. For example:
  #                        MM/DD/YY.
  # NSR_DEDUP_BACKUP:      FALSE (default) or TRUE. TRUE enables deduplication
  #                        backups with Avamar software.
  # NSR_DEDUP_NODE:        Avamar server configured as a NetWorker
  #                        deduplication node.
  # NSR_DEVICE_INTERFACE:  Set when the backup pool contains a mixture of
  #                        Networker Data Domain devices and other types of
  #                        devices to ensure the backup data is always stored
  #                        on Data Domain devices.


# #############################################################################
#               DEBUG PARAMETERS (for troubleshooting)
# #############################################################################

NSR_DEBUG_LEVEL = 3
NSR_DIAGNOSTIC_DEST = /nsr/apps/logs

  #
  # NSR_DEBUG_LEVEL:       0-9.
  # NSR_DIAGNOSTIC_DEST:   /nsr/apps/logs (default). Location of the debug
  #                        logs.

258 消息

2013年8月19日 00:00

db2 "restore db testdb load /usr/lib/libnsrdb2.so options @/db2/nmda_db2.cfg taken at 20130818085400"  刚才这个语句里漏输一个数字4,是我笔误,备了好几个版本,用不同的版本恢复,还是报

SQL2062N  An error occurred while accessing media "/usr/lib/libnsrdb2.so". 

Reason code: "11

2 Intern

 • 

1.2K 消息

2013年8月19日 01:00

这个报错在我上面提供的NMDA 1.2 Administration Guide346页上有说明:

Untitled.jpg

两种可能:一种可能是恢复的语法不对,时间戳没写对,另一种可能是需要在DB2 client resourceApplications Information属性中输入:DB2_R=database_name:db2inst1:db2inst2:

258 消息

2013年8月19日 04:00

4.jpg

如上,添加了,但是在NMC上提示客户机正在浏览,并未发现读取磁带,等了5分钟都不读取

258 消息

2013年8月19日 19:00

我对DB2熟,语句不会有任何问题

2 Intern

 • 

1.2K 消息

2013年8月19日 19:00

既然备份是成功的,那么备份的配置应该是正确的。现在是无法恢复的问题,看起来应该还是语法错误或者恢复配置不正确。

我对DB2的语句不太了解,但是文档中是这么写的:

DB2 restore to the same instance:

◆ On UNIX systems:


$ db2 restore db sample load /usr/lib/libnsrdb2.xx open n sessions options @pathname/nmda_db2.cfg taken at yyyymmddtttt into sample2

◆ On Windows systems:


$ db2 restore db sample load NetWorker_install_dir\nsr\bin\libnsrdb2.dll open n sessions options @pathname\nmda_db2.cfg taken at yyyymmddtttt into sample2

而你写的回复语句是:
db2 "restore db testdb load /usr/lib/libnsrdb2.so options @/db2/nmda_db2.cfg taken at 2013081808500"

不知道双引号会不会是问题。

如果你确认语句没有错误,我建议你在没有备份任务运行的空闲时间,运行nsrim –X来检查并修复数据的完整性。然后再试着恢复。

2 Intern

 • 

1.2K 消息

2013年8月20日 01:00

那试试nsrim –X吧,看看行不行。

258 消息

2013年8月20日 03:00

用的是NMDA1.0 X64FOR linux的,之前的NMD1.2是32位的,powerlink上下载不了软件了啊,我之前注册的用户名也登不上去了,权限太小啊

找不到事件!

Top