nbu常用命令集
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
打开NBU系统日志修改
/opt/openv/netbackup/bp.conf
VERBOSE = 5
在/opt/openv/netbackup/logs下创建相应的目录收集log,一般常见的有如下进程
bpbkar bpcd bpdbm bphdb bprd dbclient
bpbrm bpdbjobs bpdbsbora bpjobd bptm user_ops
查看media总结信息
root@mail2 # /usr/openv/netbackup/bin/admincmd/bpmedialist -summary
*******************************************************************************
MEDIA SUMMARY FOR SERVER ON Fri Aug 18 2006 16:07:17
*******************************************************************************
ACTIVE FULL SUSPENDED FROZEN IMPORTED
4 7 0 0 0
Number of NON-ACTIVE media that:
1 - will expire within 1 week
X702L1 expires 08/22/2006 00:02
3 - will expire between 1 and 2 weeks
X709L1 expires 08/29/2006 00:02
X707L1 expires 08/30/2006 23:56
X701L1 expires 08/29/2006 00:02
1 - will expire between 2 and 3 weeks
X729L1 expires 09/05/2006 00:02
2 - will expire between 3 weeks and 1 month
X705L1 expires 09/12/2006 00:02
X715L1 expires 09/15/2006 00:02
Number of ACTIVE media that, as of now:
3 - will expire between 1 and 2 weeks
X704L1 expires 08/30/2006 23:45
X725L1 expires 09/01/2006 16:05
X703L1 expires 08/31/2006 21:46
1 - will expire between 3 weeks and 1 month
X706L1 expires 09/16/2006 00:02
Summary by retention level of ALL media
Level # Media Megabytes
1 4 556604.7
3 7 663677.9
root@mail2 # /usr/openv/netbackup/bin/goodies/available_media
media media robot robot robot side/ ret size status
ID type type # slot face level KBytes
----------------------------------------------------------------------------
Backup_file pool
X725L1 HCART TLD 0 5 - 1 32509568 ACTIVE
X722L1 HCART TLD 0 2 - - - AVAILABLE
X723L1 HCART TLD 0 3 - - - AVAILABLE
X726L1 HCART TLD 0 6 - - - AVAILABLE
DataStore pool
NetBackup pool
X704L1 HCART TLD 0 4 - 1 18804704 ACTIVE
X727L1 HCART TLD 0 7 - - - DBBACKUP
None pool
X717L1 HCART TLD 0 24 - - - AVAILABLE
X720L1 HC_CLN TLD 0 1 - - - AVAILABLE
Oracle_Mail pool
X703L1 HCART TLD 0 20 - 1 120370944 ACTIVE
X706L1 HCART TLD 0 15 - 3 9907985 ACTIVE/MPX
X708L1 HCART TLD 0 21 - - - AVAILABLE
X719L1 HCART TLD 0 10 - - - AVAILABLE
X721L1 HCART TLD 0 17
- - - AVAILABLE
X701L1 HCART TLD 0 13 - 3 107984384 FULL/MPX
X702L1 HCART TLD 0 18 - 3 113219388 FULL/MPX
X705L1 HCART TLD 0 19 - 3 112660949 FULL/MPX
X707L1 HCART TLD 0 16 - 1 398278044 FULL/MPX
X709L1 HCART TLD 0 14 - 3 111589751 FULL/MPX
X715L1 HCART TLD 0 22 - 3 111035714 FULL/MPX
X729L1 HCART TLD 0 9 - 3 113208045 FULL/MPX
ora_data_backup pool
X700L1 HCART TLD 0 12 - - - AVAILABLE
X718L1 HCART TLD 0 11 - - - AVAILABLE
X728L1 HCART TLD 0 8 - - - AVAILABLE
others pool
查看某一盘磁带信息
# bpmedialist -m U569L2
Server Host = bfepdb
id rl images allocated last updated density kbytes restores
vimages expiration last read <------- STATUS ------->
--------------------------------------------------------------------------------
U569L2 1 0 10/13/2006 23:27 N/A hcart2 0 0
0 N/A N/A FROZEN
#
查看驱动器状态
root@mail2 # /opt/openv/volmgr/bin/tpconfig -d
Index DriveName DrivePath Type Shared Status
***** ********* ********** **** ****** ******
0 SEAGATEULTRIUM06242-XX /dev/rmt/0cbn hcart No UP
TLD(0) Definition DRIVE=1
Currently defined robotics are:
TLD(0) robotic path = /dev/sg/c0t0l0,
volume database host = ora
UP驱动器
# /opt/openv/volmgr/bin/vmoprcmd -up 0
查看备份任务情况。
# /usr/openv/netbackup/bin/admincmd/bpdbjobs -report | sort
列出媒体信息
# /usr/openv/netbackup/bin/goodies/available_media
查询介质信息
# /opt/openv/volmgr/bin/vmquery -m 000256
创建新pool
/usr/openv/volmgr/bin/vmpool -add scratch-pool "scratch pool" ANYHOST -1 -2
将pool设置为 scratch
/usr/openv/volmgr/binvmpool -set_scratch scratch-pool
查询volume pool 信息
# /usr/openv/volmgr/bin/vmpool -listall
===================================================================
pool number: 0
pool name: None
description: the None pool (for anyone)
pool host: ANYHOST
pool user: ANY
pool group: NONE
================================================================================
pool number: 1
pool name: NetBackup
description: the NetBackup pool
pool host: ANYHOST
pool user: 0 (root)
pool group: NONE
================================================================================
pool number: 2
pool name: DataStore
description: the DataStore pool
pool host: ANYHOST
pool user: 0 (root)
pool group: NONE
=========================================================
=======================
pool number: 3
pool name: Oracle_Mail
description: ----
pool host: ANYHOST
pool user: ANY
pool group: NONE
================================================================================
pool number: 4
pool name: others
description: ----
pool host: ANYHOST
pool user: ANY
pool group: NONE
================================================================================
pool number: 5
pool name: Backup_file
description: ----
pool host: ANYHOST
pool user: ANY
pool group: NONE
================================================================================
pool number: 6
pool name: ora_data_backup
description: ----
pool host: ANYHOST
pool user: ANY
pool group: NONE
================================================================================
root@mail2 #
将磁带改到其他 卷池
# /usr/openv/volmgr/bin/vmchange -p 15 -m 000353
/usr/openv/volmgr/bin/vmchange -p 3 -m 0060L3
解冻磁带
# /usr/openv/netbackup/bin/admincmd/bpmedia -unfreeze -ev m_id
查看长时间mounting没有反应驱动器的状态
# /opt/openv/volmgr/bin/vmoprcmd
PENDING REQUESTS
ReqId User RVSN EVSN Density Mode Time Barcode VolGroup
0 root DQ7430 DQ7430 PENDING ACTION-->(TLD) ALL DRIVES DOWN
DRIVE STATUS
Drv Type Control User Label RVSN EVSN Ready Wr.Enbl. ReqId
0 dlt DOWN-TLD - No - -
1 dlt DOWN-TLD - No - -
ADDITIONAL DRIVE STATUS
Drv DriveName Multihost Assigned Comment
0 QUANTUMDLT80000 No -
1 QUANTUMDLT80001 No -
产看NBU进程状态
# /opt/openv/netbackup/bin/bpps -a
NB Processes
------------
root 22390 1 0 6月 16 ? 0:57 bprd
root 22395 1 0 6月 16 ? 3:28 /usr/openv/netbackup/bin/bpdbm
MM Processes
------------
root 22438 22397 0 6月 16 ? 0:02 tldd
root 22476 22397 0 6月 16 ? 0:01 avrd
root 22479 1 0 6月 16 ? 0:37 tldcd
root 22400 1 0 6月 16 ? 5:22 vmd
root 22397 1 0 6月 16 ? 0:12 ltid
磁带数据过期
# /usr/openv/netbackup/bin/admincmd/bpexpdate -ev P160L1 -d 0
# /usr/openv/netbackup/bin/admincmd/bpexpdate -host bfepdb -ev U553L2 -d 0
彻底清除磁带信息
# /usr/openv/volmgr/bin/vmquery -deassignbyid 000051 5 0x0
# /usr/openv/volmgr/bin/vmquery -deassignbyid media_id poll_number status (用vmquery命令可以查到)
NBU配置信息 同时如果打开了 log功能 加上-d -i 参数可以自动提取已打开的log文件内容。
# /opt/openv/netbackup/bin/goodies/support -d 日期 -i | tee -a /tmp/support.out
# vmdareq
Drive0 - AVAILABLE
bfbkup SCAN_HOST UP
bfbwapp1 UP
bfbwdb UP
bfepapp1 UP
bfepdb UP
bfr3app1 UP
Drive1 - AVAILABLE
bfbkup SCAN_HOST UP
bfbwapp1 UP
bfbwdb UP
bfepapp1 UP
bfepdb UP
bfr3app1 UP
Drive2 - AVAILABLE
bfbkup SCAN_HOST UP
bfbwapp1 UP
bfbwdb UP
bfepapp1 UP
bfepdb UP
bfr3app1 UP
Drive3 - AVAILABLE
bfbkup SCAN_HOST UP
bfbwapp1 UP
bfbwdb UP
bfepapp1 UP
bfepdb UP
bfr3app1 UP
# stopltid
# ltid
#
# /opt/openv/netbackup/bin/goodies/bperrcode 219
219 the required storage unit is unavailable
# /opt/openv/netbackup/bin/admincmd/bperror -S 219 -L
error requesting media (tpreq)
The tape manager and optical manager (bptm) received an error when requesting a media mount from
the NetBackup Device Manager service on Windows NT/2000 or the Media Manager device daemon (ltid)
on UNIX.Next
显示推荐操作 -r参数
# /opt/openv/netbackup/bin/admincmd/bperror -S 219 -r
命令行自动配置设备
/usr/openv/volmgr/bin/tpautoconf -a
要从master开始每台media server都要执行,执行后要手工重启nbu软件进程。
EMM数据库
# /usr/openv/netbackup/bin/admincmd/nbemmcmd -listhosts
NBEMMCMD, Version:6.0MP4(20060530)
The following hosts were found:
server bossbak1
master bossbak1
app_cluster bossyydb3_srv
app_cluster bossyydb1_srv
media bossyydb1_pre
media bossyydb3_pre
media bossyydb2_pre
media bossyydb4_pre
media bosscen1_pre
media bosscen2_pre
app_cluster bossyydb2_srv
app_cluster bossyydb4_srv
Command completed successfully.
#
在NBU6.0中增加了 EMM数据库,用来记录管理主机设备磁带等信息
在这个环境下,双机环境的配置有所变化,按原来的方式配置在使用
浮动地址进行备份是回报159错误,认为客户端和server不是同一台
主机 SAN Media server license失效,这个问题采用如下方式解决
在emmdatabase中添加服务地址作为app_cluster
/usr/openv/netbackup/bin/admincmd/nbemmcmd -addhost -machinename bossyydb4_srv -machinetype app_cluster
这条命令 将bossyydb4_srv(虚拟主机名)添加为一个app_cluster类型的server
/usr/openv/netbackup/bin/admincmd/nbemmcmd -updatehost -add_server_to_app_cluster -machinename bossyydb2_pre -machinetype media -clustername bossyydb4_srv -netbackupversion 6.0 -masterserver bossbak1
这个命令将node1 bossyydb2_pre 添加到 cluster bossyydb4_srv中
/usr/openv/netbackup/bin/admincmd/nbemmcmd -updatehost -add_server_to_app_cluster -machinename bossyydb4_pre -machinetype media -clustername bossyydb4_srv -netbackupversion 6.0 -masterserver bossbak1
这个命令将node2 bossyydb4_pre 添加到 cluster bossyydb4_srv中
在ORACLE_HOME 中添加 bp.conf
REQUIRED_INTERFACE = bossyydb4_srv
CLIENT_NAME = bossyydb4_srv
列出所有配置
/usr/openv/volmgr/bin/vmglob -listall
设置驱动器的清洗周期
/usr/openv/volmgr/bin/tpclean -F IBM.ULT3
580-TD3.000 60
查看驱动器清洗状态
/usr/openv/volmgr/bin/tpclean -L
Drive Name Type Mount Time Frequency Last Cleaned Comment
********** **** ********** ********* **************** *******
IBM.ULT3580-TD3.000 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.001 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.002 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.003 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.004 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.005 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.006 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.007 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.008 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.009 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.010 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.011 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.012 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.013 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.014 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.015 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.016 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.017 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.018 hcart3* 0.0 60 N/A
IBM.ULT3580-TD3.019 hcart3* 0.0 60 N/A
# 查license
/opt/openv/netbackup/bin/admincmd/get_license_key
License Key Utility
-------------------
A) Add a License Key
D) Delete a License Key
F) List Active License Keys
L) List Registered License Keys
H) Help
q) Quit License Key Utility
Enter a letter:
vxlogview -p 51216 -b "07/16/08 6:00:00 AM" -e "7/16/08 7:10:00 AM"
/usr/openv/netbackup/bin/vxlogview -p 51216 -b "07/17/08 6:00:00 AM" -e "7/17/08 7:10:00 AM"
/usr/openv/netbackup/bin/vxlogcfg -a --prodid NB --orgid All -s DebugLevel=1 -s DiagnosticLevel=1
/usr/openv/netbackup/bin/vxlogcfg -l --prodid NB --orgid default
导入已过期的备份
bpimport -create_db_info -id 000151 -server hq-boss-sdb-s -L /tmp/bpimport151.ls&
bpimport -create_db_info -id 000152 -server hq-boss-sdb-s -L /tmp/bpimport152.ls&
bpimport -id 000152 -L /tmp/bpimport152-1.ls&
bpimport -id 000151 -L /tmp/bpimport151-1.ls&
查看nbu catalog
/usr/openv/netbackup/bin/admincmd/bpcatlist -client hq-boss-sdb-s
bpimagelist -backupid hq-boss-sdb-l_1228083574
bpimagelist -media -U -backupid hq-boss-sdb-l_1228104659
bpimagelist -L -backupid hq-boss-sdb-l_1228104602 | more
bpimagelist -L -backupid hq-boss-sdb-s_12350099
63 | more
bplist -t 4 -R -l
nohup /usr/openv/netbackup/bin/admincmd/bpimport -create_db_info -id 000029 -server hq-boss-sdb-s -L /tmp/29.ls&
bpimport -create_db_info -id 000004 -server hq-boss-sdb-s -L /tmp/imp04.ls&
列出所有策略信息
bppllist -U -allpolicies