免费注册 查看新帖 |

Chinaunix

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

[Veritas NBU] NBU备份INFORMIX双机问题,急!!!高手请指点!!!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-14 23:04 |只看该作者 |倒序浏览
MASTER SERVER:Solaris8
SAN Media Server:HP-UX双机

informix有4个instance

我安装完NBU,配好设备之后,测试文件级备份没有问题。

之后安装informix agent,执行informix_config脚本,选择informix home path为/opt/informix

自动在/opt/informix/etc下的sm_versions文件中加入1|1.1.0|VERITAS-NetBackup|1|

然后Linking /opt/informix/lib/ibsad001.sl to /usr/openv/netbackup/bin/infxbsa.sl64.

然后编辑onconfig文件,修改以下参数

#TAPEDEV        /dev/null                        # Tape device path        
TAPEDEV                /dev/rmt/1m        # Tape device path        

#LTAPEDEV        /dev/null        # Log tape device path
LTAPEDEV        /opt/informix/nbu_log/logs        #Log tape device path

# Backup/Restore variables
BAR_ACT_LOG   /opt/informix/bar_act.log  # ON-Bar Log file - not in /tmp please
BAR_DEBUG_LOG /opt/informix/bar_dbug.log # ON-Bar Debug Log - not in /tmp please
BAR_MAX_BACKUP        0
BAR_RETRY        1
BAR_NB_XPORT_COUNT 10
BAR_XFER_BUF_SIZE 31
#RESTARTABLE_RESTORE        ON
#BAR_PROGRESS_FREQ        0
BAR_BSALIB_PATH /opt/informix/lib/ibsad001.sl

保存之后修改脚本进行备份,脚本如下:





#!/bin/sh
# $Revision: 1.3.10.1 $
#bcpyrght
#***************************************************************************
#* $VRTScprght: Copyright 1993 - 2004 VERITAS Software Corporation, All Rights Reserved $ *
#***************************************************************************
#ecpyrght

# Replace xxxxx below with the extention used for your onconfig file.
ONCONFIG=onconfig.omp

# Replace yyyyy below with the Informix home path.
INFORMIXDIR=/opt/informix

# Replace zzzzz below with the name of the Informix server.
INFORMIXSERVER=ompserver1

# Replace informix_etc below with the name of the NetBackup server policy
# to be used to back up the $INFORMIXDIR/etc directory.
INFX_ETC_POLICY=HBDB84_1_informix_etc


echo "Started `date`"

export ONCONFIG
echo "exported ONCONFIG"

export INFORMIXDIR
echo "exported INFORMIXDIR"

export INFORMIXSERVER
echo "exported INFORMIXSERVER"

echo "INFXBSA_SERVER = $INFXBSA_SERVER"
echo "INFXBSA_SCHEDULED = $INFXBSA_SCHEDULED"
echo "INFXBSA_USER_INITIATED = $INFXBSA_USER_INITIATED"
echo "INFXBSA_FULL = $INFXBSA_FULL"
echo "INFXBSA_INCR = $INFXBSA_INCR"
echo "INFXBSA_POLICY = $INFXBSA_POLICY"

RETURN_STATUS=0

if [ "${INFXBSA_INCR}" = "1" ]
then
#         Netbackup has started an incremental backup.
    echo "$INFORMIXDIR/bin/onbar -b -L 1 ompdb"
        $INFORMIXDIR/bin/onbar -b -L 1 ompdb
        RETURN_STATUS=$?
else

    echo "$INFORMIXDIR/bin/onbar -b -L 0 ompdb"
    $INFORMIXDIR/bin/onbar -b -L 0 ompdb
    RETURN_STATUS=$?
fi

if        [ "$RETURN_STATUS" -eq "0" ]
then

        # Initiate a backup of the directory that contains the onconfig,
        # sqlhosts, oncfg_$INFORMIXSERVER.SERVERNUM, and ixbar.SERVERNUM
        # files after doing the backup.

        echo "bpbackup -p $INFX_ETC_POLICY -w 0 $INFORMIXDIR/etc"
        /usr/openv/netbackup/bin/bpbackup -p $INFX_ETC_POLICY -w 0 $INFORMIXDIR/etc
        BPBACKUP_STATUS=$?

        if [ "$BPBACKUP_STATUS" -ne "0" ]
        then
                echo ""
                echo "bpbackup of $INFORMIXDIR/etc returned $BPBACKUP_STATUS"
        fi
fi

echo "Finished `date`"

echo "exit $RETURN_STATUS"
echo ""

exit $RETURN_STATUS




备份出错,NBU报的错是6,查看informix的bar_act.log,发现
2006-03-14 10:59:06 27499  27497 Working with veritas-netbackup as generic storage manager.
2006-03-14 10:59:06 27499  27497 Unable to open connection to database server: could not fork server connection, SQLCODE -23101.
2006-03-14 10:59:06 27499  27497 /opt/informix/bin/onbar_d complete, returning 130 (0x82)



sqlhosts文件如下,NBU备份使用的都是主机名,我使用物理节点或者虚拟节点的IP,主机名都试过,现象一样

#**************************************************************************
#
#  Licensed Material - Property Of IBM
#
#  "Restricted Materials of IBM"
#
#  IBM Informix Dynamic Server
#  (c) Copyright IBM Corporation 1996, 2004 All rights reserved.
#
#   Title:        sqlhosts.demo
#   Description:
#                Default sqlhosts file for running demos.
#
#**************************************************************************

demo_on        onipcshm        on_hostname        on_servername
wnmsserver3       onipcshm        10.120.136.6  8001
wnmsserver1       onsoctcp        10.120.136.6  8002
nmosserver3       onipcshm        10.120.136.6  8003
nmosserver1       onsoctcp        10.120.136.6  8004
eomsserver1       onipcshm        10.120.136.6  8005
eomsserver3       onsoctcp        10.120.136.6  8006
server                  onsoctcp          10.120.136.6        8007
ompserver3        onipcshm        10.120.136.6  8009
ompserver1        onsoctcp        10.120.136.6  8010





请指点到底是什么地方的问题,不胜感激!!

论坛徽章:
0
2 [报告]
发表于 2006-03-15 11:28 |只看该作者
你把INFORMIX用户配置的环境变量贴出来.

论坛徽章:
0
3 [报告]
发表于 2006-03-15 11:48 |只看该作者
/export/home/ompuser> env

Warning! One or more of your selected locales are not available.
Please invoke the commands "locale" and "locale -a" to verify your
selections and the available locales.

Continuing processing using the "C" locale.

HOME=/export/home/ompuser
PATH=./:/opt/informix/bin:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/resmon/bin:/opt/mx/bin:/opt/aCC/bin:/opt/gnome/bin:/opt/perf/bin:/opt/mozilla:/opt/perl/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/langtools/bin:/opt/imake/bin:/usr/sbin/diag/contrib:/opt/graphics/common/bin:/opt/ignite/bin:/bin:/usr/bin:/usr/sbin:/usr/ucb:/etc:/opt/informix:/opt/informix/bin:/opt/informix/etc:.
LOGNAME=ompuser
SHELL=/usr/bin/csh
TERM=vt100
COLUMNS=132
LINES=46
MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/mx/share/man:/opt/resmon/share/man:/usr/dt/share/man:/opt/samba/man:/opt/aCC/share/man/%L:/opt/aCC/share/man:/opt/audio/share/man:/opt/ansic/share/man/%L:/opt/ansic/share/man:/opt/langtools/share/man/%L:/opt/langtools/share/man:/opt/gnome/man:/opt/perf/man/%L:/opt/perf/man:/opt/image/share/man:/opt/perl/man:/opt/wbem/share/man:/opt/imake/man:/opt/openssl/man:/opt/openssl/prngd/man:/opt/hparray/share/man/%L:/opt/hparray/share/man:/opt/graphics/common/man:/opt/EMCpower/share:/opt/mqm/man
TZ=EAT-8
KAIOON=1
IFMX_HPKAIO_NUM_REQ=2300
DB_COMMON=/opt/BOCO.Common/DB
DB_PATH=/opt/BOCO.NRM/DB
PERL5LIB=/opt/BOCO.Common/DB/lib:/opt/BOCO.NRM/DB/lib:/opt/BOCO.NRM/DB/ReportSum/lib
INFORMIXDIR=/opt/informix
INFORMIXSERVER=ompserver1
ONCONFIG=onconfig.omp
LANG=zh
CLIENT_LOCALE=zh_cn.gb
DB_LOCALE=zh_cn.gb






现在这个问题解决了,是通过在备份脚本中添加环境变量CLIENT_LOCALE和DB_LOCALE解决的。

还有个问题,informix不备份Log是不是不能进行数据库dbspace的备份啊?现在Log是循环利用的
我单独备份dbs时报这个错:

这里是将onconfig文件中的LTAPEDEV设为/dev/null时:
2006-03-15 09:45:42 25648  25646 /opt/informix/bin/onbar_d -b -L 0 ompdbs
2006-03-15 09:45:42 25648  25646 ERROR: Logical Logs will not be backed up / salvaged because
LTAPEDEV value is /dev/null . Normal backup (onbar -b) cannot be done
without logical logs being backed up, because restore of such backups
requires a logical log restore.
2006-03-15 09:45:42 25648  25646 /opt/informix/bin/onbar_d complete, returning 156 (0x9c)




这里是将onconfig文件中的LTAPEDEV设为/opt/informix/nbu_log/logs时:(没有重启数据库)

2006-03-15 09:20:35 17380  17378 /opt/informix/bin/onbar_d -b -L 0 rootdbs
2006-03-15 09:20:35 17380  17378 Working with veritas-netbackup as generic storage manager.
2006-03-15 09:20:36 17380  17378 Begin level 0 backup rootdbs.
2006-03-15 09:20:36 17380  17378 Successfully connected to Storage Manager.
2006-03-15 09:21:03 17380  17378 Completed level 0 backup rootdbs (Storage Manager copy ID: 1 114238563.
2006-03-15 09:21:03 17380  17378 Unable to start the logical log backup: Log backup to device '/dev/null' not allowed
2006-03-15 09:21:08 17380  17378 /opt/informix/bin/onbar_d complete, returning 131 (0x83)

论坛徽章:
0
4 [报告]
发表于 2006-03-15 13:09 |只看该作者
我给你个正确的配置ONCONFIG文件的信息
ROOTNAME        rootdbs         # Root dbspace name
ROOTPATH        /usr5/linkdata/sys/root_chk2_1
                                # Path for device containing root dbspace
ROOTOFFSET      0               # Offset of root dbspace into device (Kbytes)
ROOTSIZE        2048000         # Size of root dbspace (Kbytes)

# Disk Mirroring Configuration Parameters

MIRROR          0               # Mirroring flag (Yes = 1, No = 0)
MIRRORPATH                      # Path for device containing mirrored root
MIRROROFFSET    0               # Offset into mirrored device (Kbytes)

# Physical Log Configuration

PHYSDBS         phylogdbs         # Location (dbspace) of physical log
PHYSFILE        2040000            # Physical log file size (Kbytes)

# Logical Log Configuration

LOGFILES        201             # Number of logical log files
LOGSIZE         10000            # Logical log size (Kbytes)

# Diagnostics

MSGPATH         /opt/informix/online.log # System message log file path
CONSOLE         /dev/console    # System console message path

# To automatically backup logical logs, edit alarmprogram.sh and set
# BACKUPLOGS=Y
ALARMPROGRAM    /opt/informix/etc/no_log.sh # Alarm program path
TBLSPACE_STATS  1               # Maintain tblspace statistics

# System Archive Tape Device

TAPEDEV         /dev/null       # Tape device path      
TAPEBLK         32              # Tape block size (Kbytes)
TAPESIZE        10240           # Maximum amount of data to put on tape (Kbytes)

# Log Archive Tape Device

LTAPEDEV        /dev/tapedev       # Log tape device path
LTAPEBLK        32              # Log tape block size (Kbytes)
LTAPESIZE       10240           # Max amount of data to put on log tape (Kbytes)

# Optical

STAGEBLOB                       # Informix Dynamic Server staging area

# System Configuration

SERVERNUM       1               # Unique id corresponding to a OnLine instance
DBSERVERNAME    sxdb            # Name of default database server
DBSERVERALIASES                 # List of alternate dbservernames
NETTYPE         tlitcp,6,20,NET # Configure poll thread(s) for nettype
DEADLOCK_TIMEOUT 60              # Max time to wait of lock in distributed env.
RESIDENT        0               # Forced residency flag (Yes = 1, No = 0)

MULTIPROCESSOR  1               # 0 for single-processor, 1 for multi-processor
NUMCPUVPS       7               # Number of user (cpu) vps
SINGLE_CPU_VP   0               # If non-zero, limit number of cpu vps to one

NOAGE           0               # Process aging
AFF_SPROC       1               # Affinity start processor
AFF_NPROCS      7               # Affinity number of processors

# Shared Memory Parameters

LOCKS           700000            # Maximum number of locks
BUFFERS         1500000            # Maximum number of shared buffers
NUMAIOVPS       6                # Number of IO vps
PHYSBUFF        32              # Physical log buffer size (Kbytes)
LOGBUFF         32              # Logical log buffer size (Kbytes)
CLEANERS        14               # Number of buffer cleaner processes
SHMBASE         0x10a000000       # Shared memory base address
SHMVIRTSIZE     500000            # initial virtual shared memory segment size
SHMADD          10000            # Size of new shared memory segments (Kbytes)
SHMTOTAL        0               # Total shared memory (Kbytes). 0=>unlimited
CKPTINTVL       300             # Check point interval (in sec)
LRUS            32               # Number of LRU queues
LRU_MAX_DIRTY   2.000000       # LRU percent dirty begin cleaning limit
LRU_MIN_DIRTY   1.000000       # LRU percent dirty end cleaning limit
TXTIMEOUT       0x12c             # Transaction timeout (in sec)
STACKSIZE       64              # Stack size (Kbytes)

# Dynamic Logging
# DYNAMIC_LOGS:
#    2 : server automatically add a new logical log when necessary. (ON)
#    1 : notify DBA to add new logical logs when necessary. (ON)
#    0 : cannot add logical log on the fly. (OFF)
#
# When dynamic logging is on, we can have higher values for LTXHWM/LTXEHWM,
# because the server can add new logical logs during long transaction rollback.
# However, to limit the number of new logical logs being added, LTXHWM/LTXEHWM
# can be set to smaller values.
#
# If dynamic logging is off, LTXHWM/LTXEHWM need to be set to smaller values
# to avoid long transaction rollback hanging the server due to lack of logical
# log space, i.e. 50/60 or lower.

DYNAMIC_LOGS    2               
LTXHWM          70              
LTXEHWM         80              

# System Page Size
# BUFFSIZE - OnLine no longer supports this configuration parameter.
#            To determine the page size used by OnLine on your platform
#            see the last line of output from the command, 'onstat -b'.


# Recovery Variables
# OFF_RECVRY_THREADS:
# Number of parallel worker threads during fast recovery or an offline restore.
# ON_RECVRY_THREADS:
# Number of parallel worker threads during an online restore.

OFF_RECVRY_THREADS 10              # Default number of offline worker threads
ON_RECVRY_THREADS 1               # Default number of online worker threads

# Data Replication Variables
DRINTERVAL      30              # DR max time between DR buffer flushes (in sec)
DRTIMEOUT       30              # DR network timeout (in sec)
DRLOSTFOUND     /opt/informix/etc/dr.lostfound # DR lost+found file path

# CDR Variables
CDR_EVALTHREADS 1,2             # evaluator threads (per-cpu-vp,additional)
CDR_DSLOCKWAIT  5               # DS lockwait timeout (seconds)
CDR_QUEUEMEM    4096            # Maximum amount of memory for any CDR queue (Kbytes)
CDR_NIFCOMPRESS 0               # Link level compression (-1 never, 0 none, 9 max)
CDR_SERIAL      0,0             # Serial Column Sequence
CDR_DBSPACE                     # dbspace for syscdr database
CDR_QHDR_DBSPACE                 # CDR queue dbspace (default same as catalog)
CDR_QDATA_SBSPACE                 # List of CDR queue smart blob spaces

# CDR_MAX_DYNAMIC_LOGS
# -1 => unlimited
#  0 => disable dynamic log addition
# >0 => limit the no. of dynamic log additions with the specified value.
# Max dynamic log requests that CDR can make within one server session.

CDR_MAX_DYNAMIC_LOGS 0               # Dynamic log addition disabled by default

# Backup/Restore variables
BAR_ACT_LOG     /opt/informix/bar_act.log # ON-Bar Log file - not in /tmp please
BAR_DEBUG_LOG   /usr/informix/bar_dbug.log
                                # ON-Bar Debug Log - not in /tmp please
BAR_MAX_BACKUP  1               
BAR_RETRY       10               
BAR_NB_XPORT_COUNT 10              
BAR_XFER_BUF_SIZE 31              
RESTARTABLE_RESTORE on              
BAR_PROGRESS_FREQ 0

论坛徽章:
0
5 [报告]
发表于 2009-04-09 18:53 |只看该作者
都是环境变量惹得祸,但关键就是不知道到底哪个环境变量有问题;郁闷啊!

论坛徽章:
1
CU十二周年纪念徽章
日期:2013-10-24 15:41:34
6 [报告]
发表于 2009-04-09 19:00 |只看该作者
环境变量问题。

把informix用户的环境变量写到备份脚本中,再试一试。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP