NBU常用

1. Solaris下:
/usr/openv/volmgr/bin/sgscan changer 查看本机所有Robot设备;
/usr/openv/volmgr/bin/sgscan tape 查看本机所有的磁带驱动器。
/usr/openv/volmgr/bin/sgscan disk 查看本机所有的disk,包括本地磁盘和共享磁盘。

2. robot及磁带驱动器配置:
/usr/openv/volmgr/bin/tpconfig 提供add ,delete,list NBU可以识别并使用的物理设备。
/usr/openv/volmgr/bin/stopltid
/usr/openv/volmgr/bin/stopltid <参数> :当修改配置后请重启:ltid(设备管理进程)。
tpconfig: 可以进入文本菜单。 先配置robot,再配置磁带驱动器。
/usr/openv/volmgr/bin/tpconfig -d 可以查看磁带驱动器及robot细节情况。
当配置完成之后,一定要重启ltid进程。
#robtest

# tpconfig -d
Id DriveName Type Residence
Drive Path Status
****************************************************************************
0 HP.ULTRIUM3-SCSI.000 hcart3 TLD(0) DRIVE=1
/dev/rmt/0cbn UP
/dev/rmt/1cbn UP

Currently defined robotics are:
TLD(0) robotic path = /dev/sg/c0tw500110a0009485aal1

EMM Server = dcd-bjgglc-logcdr

3. 名词介绍:
image: 镜像:一个客户端在一次备份中所有数据的集合。
storage unit: 存储单元:保存备份的逻辑位置,可以是磁盘也可以是磁带。
volume: 卷: 每一个磁带一个编号,称为一个卷。
volume: 卷池:一组卷的集合,在备份时需要指明卷池,netbackup会自动维护卷池中的所有卷。
backup policy: 备份策略:4方面:数据保存在哪个存储单元,什么时段运行,备份哪些client的数据;
需要备份的数据的位置。

4. netbackup 进程维护
/usr/openv/netbackup/bin/bpps -a 查看netbackup 所有进程,也可以通过图形界面查看Daemons状态。
bp.kill_all 启动netbackup (netbackup stop)
bp.start_all 停止netbackup (netbackup start)

jnbSA % 启动netbackup图形化界面.

5. 磁带维护
/usr/openv/netbackup/bin/goodies/available_media:
以root用户运行,可以查看磁带的状态等等信息;
status: full,active,available,frozen,dbbackup.
当有磁带frozen时,可以用:bpmedia -unfreeze -m A00006,对磁带进行解frozen;
当磁带反复frozen时,请检查是否有坏,或是此磁带是清洗带。

过期磁带: bpexpdate -m media_id -d 0 eg: bpexpdate -m NU06CU -d 0 使磁带可重写。
bpexpdate -backupid eel_0904219764 -d 0 删除备份

bpexpdate: -m <media id> -d <yyyy-mm-dd HH:MM:SS | 0 | infinity>
[-host <name>] [-force] [-nodelete] [-notimmediate]
[-M <master_server,…,master_server>]
bpexpdate: -deassignempty [-m <media id>] [-force]
[-M <master_server,…,master_server>]
bpexpdate: -backupid <backup id> -d <yyyy-mm-dd HH:MM:SS | 0 | infinity>
[-client <name>] [-copy <number>] [-force] [-nodelete] [-notimmediate]
[-M <master_server,…,master_server>]
bpexpdate: -recalculate [-backupid <backup id>] [-copy <number>]
[-d <yyyy-mm-dd HH:MM:SS | 0 | infinity>] [-client <name>]
[-policy <name>] [-ret <retention level>] [-sched <type>]
[-M <master_server,…,master_server>]
bpexpdate: -stype <server type>
[-dp <disk pool> [-dv <disk volume>]]
[-nodelete] [-notimmediate]
[-M <master_server,…,master_server>]
legal values for sched: 0=full,1=differential incr,2=user,3=arch
4=cumulative incr

bplist:

#bplist -C dcd-bjgglc-rac03-vip -t 4 -l -R 4代表oracle

# bplist –help
bplist: unrecognized option –help
USAGE: bplist [-A | -B] [-C client] [-S master_server]
[-t policy_type] [-k policy] [-keyword “keyword phrase”]
[-F] [-R [n]] [-b | -c | -u] [-l] [-Listpolicy] [-Listseconds]
[-r] [-T] [-I] [-PI] [-unix_files | -nt_files] [-flops file_options]
[-s yyyy-mm-dd [HH:MM:SS]] [-e yyyy-mm-dd [HH:MM:SS]] [filename]

bpmedialist -l: 查看磁带信息。

bplabel: 对磁带进行label : 有三种方式 :quick erase; long erase; NBU label;
/usr/openv/netbackup/bin/admincmd/bplabel -erase -o -m <mediaid> -d hcart -p NetBackup -host <server>
/usr/openv/netbackup/bin/admincmd/bplabel -erase -l -o -m <mediaid> -d hcart -p NetBackup -host <server>
/usr/openv/netbackup/bin/admincmd/bplabel -m <mediaid> -d hcart -o -p NetBackup [-n drive_name | -u device_number] -host <server>
对磁带label 可以检查,磁带是否有问题,时间也很快。

/usr/openv/netbackup/bin/admincmd/bpdbjobs -report
/usr/openv/netbackup/bin/admincmd/bperror -U –problems 报告24小时内的问题。
/usr/openv/netbackup/bin/admincmd/bpgetconfig | more 获得netbackup的配置信息。
/usr/openv/netbackup/bin/bpclntcmd -hn Client_A 测试到某client是否有问题。

磁带的池:
netbackup : 默认扫描到的磁带都放在此池;除clear带。
none: 默认放清洗带。
其他池可以手工建议:对一个策略建立一个池,从netbackup中找到数据带,分配到相应的策略池中。
并可以对分配完成的磁带进行label操作,可以检查磁带是否有问题。
6.管理维护:
bpadm 可以进行日常维护用,而不用jnbSA 的图形化界面。

#bpflist -d 2009-07-01 -e 2009-07-02 -policy dbbackup -client dcd-bjgglc-rac03-vip -U

这一句可能是最有用的。

#bpps -a

#bpdbjobs -report 执行结果的状态问题: 0 :成功; 96: 没有空闲磁带可用。其他:

bpimage –help
bpimage: unrecognized option –help
bpimage: -[de]compress [-allclients | -client <name>]
bpimage: [-M <master_server,…,master_server>]
bpimage: -npc <copy #> -backupid <backup_id> [-client <name>]
bpimage: -newserver <name> [-oldserver <name>] [-id <id>]
bpimage: -deletecopy <#> -backupid <backup_id>
bpimage: -testlock <#> -backupid <backup_id>
bpimage: -prunetir [-allclients | -client <name>] -cleanup
bpimage: -create_image_list -client <name>
bpimage: -gendrreport -backupid <backup id>
bpimage: -wff <path bytes> -backupid <backup_id> [-client <name>]
bpimage: -update [-secinfo <[0|1]> | -rfile <[0|1]> |
-filesysonly <[0|1]> |
-numfiles <number> | -keyword “keyword phrase” | -objdesc <string>]
[-client <name> -policy <name> -t <type> -d yyyy-mm-dd HH:MM:SS]
[-client <name> -d yyyy-mm-dd HH:MM:SS]
[-id <backup_id>]

# bpflist –help
bpflist: unrecognized option –help
bpflist: [-l | -L | -U] [-v]
[-M master_server…]
[-d yyyy-mm-dd HH:MM:SS][-e yyyy-mm-dd HH:MM:SS]
[-ut <unixtime for start and end date>]
[-st sched_type]
[-policy policy_name][-client client_name]
[-keyword “keyword phrase”][-pattern fullpath]
[-pt policy_type]
[-user name][-group name][-raw mode]
[-backupid name][-force_print]
[-psep path_separator_character]
[-malgo match_algorithm (0 1 2 or 3)]
[-rl recursion_level (0..999)]
[-option <list of:
NONE ONE_PASS NO_HSHAKE GET_ALL_FILES
INCLUDE_TIR ONLY_TIR ONLY_DIRS FILESYSTEM_ONLY
ONE_CONNECT INCLUDE_RAW_INCR INCLUDE_BITMAP INCLUDE_FSMAP
INCLUDE_EDI IGNORE_CASE INCLUDE_EFI>]

bpflist: -complete -policy policy_name [-client client_name][-st sched_type][-bt <unixtime>]

Valid values for sched_type:
FULL, INCR, CINC, UBAK, UARC, ANY, SCHED, USER, NOT_ARCHIVE

Valid values for policy_type:
Standard, Oracle, Informix-On-BAR, Sybase,
NetWare, MS-Windows-NT, OS/2, DB2, AFS,
DataStore, Lotus-Notes, NBU-Catalog, Generic,
PureDisk-Export

 

其他例子:

root@bjdb # sgscan
/dev/sg/c0t0l0: Disk (/dev/rdsk/c0t0d0): “HITACHI DK32EJ36NSUN36G”
/dev/sg/c0t1l0: Disk (/dev/rdsk/c0t1d0): “HITACHI DK32EJ36NSUN36G”
/dev/sg/c0t2l0: Processor: “Sun D240”
/dev/sg/c0t3l0: Processor: “Sun D240”
/dev/sg/c0t4l0: Tape (/dev/rmt/0): “HP C5683A”
/dev/sg/c0t6l0: Cdrom: “TOSHIBA DVD-ROM SD-M1711”
/dev/sg/c0tw20030003ba4e80c0l0: Disk (???): “SUN T4”
/dev/sg/c1tw20030003ba4e80c0l0: Disk (???): “SUN T4”
/dev/sg/c2t1l0: Tape (/dev/rmt/1): “HP Ultrium 2-SCSI”

root@bjdb #
root@bjdb # mt -f /dev/rmt/1 status
/dev/rmt/1: no tape loaded or drive offline
root@bjdb # /opt/openv/netbackup/bin/goodies/netbackup start
Media Manager daemons started.
NetBackup request daemon started.
root@bjdb # cd /opt/openv/netbackup/bin/goodies/
root@bjdb # ls
README bpstart_notify fimselector ms_sharepoint_server.filelist
README.busy_files check_coverage lotusnotes.filelist ms_sharepoint_ws.filelist
VRTS-HEADER-MIB.txt cleanstats mail_bp_reports netbackup
VRTS-SNMP-MIB-Readme.txt cltemplates man new_clients
VRTS-SNMP-MIB.txt db2.filelist mediascripts nonroot_admin
available_media db_begin_bkup ms_exchange.filelist oracle_rman.filelist
bp.kill_all db_begin_streams ms_exchange_2000.filelist oracle_xml_export.filelist
bpend_notify db_end_bkup ms_exchange_kms.filelist pltemplates
bpend_notify_busy db_end_streams ms_exchange_mailbox.filelist support
bperrcode duplicate_images ms_exchange_pub.filelist verify_images
bpplconvert edit_services ms_exchange_srs.filelist windows2000.filelist
root@bjdb # pwd
/opt/openv/netbackup/bin/goodies
root@bjdb # cd
root@bjdb # /opt/openv/netbackup/bin/goodies/available_media
media media robot robot robot side/ ret size status
ID type type # slot face level KBytes
—————————————————————————-
DataStore pool

J206L2 HCART2 TLD 0 7 – – – AVAILABLE
J207L2 HCART2 TLD 0 8 – – – AVAILABLE
J208L2 HCART2 TLD 0 3 – – – AVAILABLE

NetBackup pool

J202L2 HCART2 TLD 0 4 – – – AVAILABLE
J203L2 HCART2 TLD 0 9 – – – AVAILABLE
J204L2 HCART2 TLD 0 5 – – – AVAILABLE
J205L2 HCART2 TLD 0 6 – – – AVAILABLE
N232L1 HCART2 TLD 0 11 – – – AVAILABLE
N233L1 HCART2 TLD 0 23 – – – AVAILABLE
N234L1 HCART2 TLD 0 12 – – – AVAILABLE
J200L2 HCART2 TLD 0 24 – – – DBBACKUP

None pool

J201L2 HC2_CLN TLD 0 2 – – – AVAILABLE

bjappusr2 pool

J209L2 HCART2 TLD 0 10 – – – AVAILABLE

oracle_bak pool

J210L2 HCART2 TLD 0 22 – – – AVAILABLE
J211L2 HCART2 TLD 0 21 – – – AVAILABLE
J212L2 HCART2 TLD 0 20 – – – AVAILABLE
J213L2 HCART2 TLD 0 19 – – – AVAILABLE
J214L2 HCART2 TLD 0 18 – – – AVAILABLE
J215L2 HCART2 TLD 0 17 – – – AVAILABLE
J216L2 HCART2 TLD 0 16 – – – AVAILABLE
J217L2 HCART2 TLD 0 15 – – – AVAILABLE
J218L2 HCART2 TLD 0 14 – – – AVAILABLE
J219L2 HCART2 TLD 0 13 – – – AVAILABLE

root@bjdb #
root@bjdb # vmoprcmd -d

PENDING REQUESTS

<NONE>

DRIVE STATUS

Drv Type Control User Label RecMID ExtMID Ready Wr.Enbl. ReqId
0 hcart2 AVR – No – –

ADDITIONAL DRIVE STATUS

Drv DriveName Shared Assigned Comment
0 HPC5683A0 No –
root@bjdb # tpconfig -d
Index DriveName DrivePath Type Shared Status
***** ********* ********** **** ****** ******
0 HPC5683A0 /dev/rmt/0cbn hcart2 No UP
TLD(0) Definition DRIVE=1

Currently defined robotics are:
TLD(0) robotic path = /dev/sg/c2t0l0,
volume database host = bjdb
root@bjdb #

If you enjoyed this post, make sure you subscribe to my RSS feed!
此条目发表在NBU, 备份软件分类目录。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image