命令列方式管理NETBACKUP

yangtingkun發表於2007-07-15

剛開始接觸netbackup的時候,一直使用jnbSA圖形介面管理、監控NETBACKUP。今天發現和jnbSA功能相近的命令列工具:bpadm


有些時候由於網路條件限制,無法啟動遠端圖形介面,這個時候命令列工具就顯得尤為重要了。

簡單看一下bpadm的功能:

# bpadm


NetBackup Server: backup


NetBackup Administration
------------------------
s) Storage Unit Management...
t) Storage Unit Group Management...
p) Policy Management...
g) Global Configuration...
r) Reports...
m) Manual Backups...
x) Special Actions...
u) User Backup/Restore...
e) Media Management...
h) Help
q) Quit

ENTER CHOICE:

從這裡看的處理,基本上jnbSA的功能在bpadm中都包括了,命令列唯一比較差的是缺少實時監控的功能。

不過透過Reports命令也可以實現其中部分功能:


Server: ALL
Client: ALL
Start Date: 05/11/2007 23:29:11
End Date: 05/12/2007 23:59:59
Output Destination: SCREEN

Reports
-------
b) Backup Status
l) List Client Backups
p) Problems
a) All Log Entries
m) Media...

d) Change Dates
c) Change Client
s) Change Server
o) Output Destination (SCREEN or FILE)
h) Help
q) Quit Menu

ENTER CHOICE:

Backup Status包含了最近完成的備份情況,而List Client Backups包括的資訊會更詳細一些。不過這兩個報告無法看到正確執行的情況。

透過All Log Entries可以看到詳細的後臺操作資訊,比如netbackup的備份開始、結束等等。檢查日誌可以在某種程度上實現目標實時監控的功能。

下面是Backup StatusList Client BackupsAll Log Entries的報告片斷:

STATUS CLIENT POLICY SCHED SERVER TIME COMPLETED
0 backup testoracle Default-Ap backup 05/12/2007 00:40:27
0 backup testoracle Default-Ap backup 05/12/2007 00:41:54
0 backup testoracle Default-Ap backup 05/12/2007 00:45:56
0 backup testoracle Default-Ap backup 05/12/2007 00:47:20
0 racnode1 installagent Default-Ap backup 05/12/2007 00:56:10
0 racnode1 installagent Default-Ap backup 05/12/2007 00:57:34

(B)ack (F)orward (U)p (D)own (Q)uit

Client: backup
Backup ID: backup_1178901997
Policy: testoracle
Policy Type: Oracle
Sched Label: Default-Application-Backup
Schedule Type: User Backup (Backup Policy)
Retention Level: infinity (9)
Backup Time: 05/12/2007 00:46:37
Elapsed Time: 000:00:43
Expiration Time: INFINITY
Compressed: no
Encrypted: no
Kilobytes: 7200
Number of Files: 1
Primary Copy: 1
Image Type: 0 (Regular)
Keyword: test
Ext Security Info: no
File Restore Raw: no
Image Dump Level: 0
File System Only: no
Object Descriptor: (none specified)
Multiplexed: no
TIR Available: no
Backup Copy: Standard (0)

Client: backup
Backup ID: backup_1178901869
Policy: testoracle
Policy Type: Oracle
Sched Label: Default-Application-Backup
Schedule Type: User Backup (Backup Policy)
Retention Level: infinity (9)
Backup Time: 05/12/2007 00:44:29
Elapsed Time: 000:01:26
Expiration Time: INFINITY
Compressed: no
Encrypted: no
Kilobytes: 522272
Number of Files: 1
Primary Copy: 1
Image Type: 0 (Regular)
Keyword: test
Ext Security Info: no
File Restore Raw: no
Image Dump Level: 111

(B)ack (F)orward (U)p (D)own (Q)uit

TIME SERVER/CLIENT TEXT
05/12/2007 00:36:13 backup - INITIATING bpdbm: NetBackup 6.0 2006110304 on backup IDIRSTRUCT=2 (VERBOSE = 0)
05/12/2007 00:36:15 backup - INITIATING bpjobd: NetBackup 6.0 on backup
05/12/2007 00:36:20 backup - INITIATING bprd: NetBackup 6.0 2006110304 on backup
05/12/2007 00:36:33 backup - [3] backup of client backup, policy testoracle, is suspended: exceeded configured number of tries for
a schedule
05/12/2007 00:37:09 backup backup client backup handling path /0pihgb9h_1_1
05/12/2007 00:37:09 backup - running session_start_notify
05/12/2007 00:37:09 backup - started backup job (jobid=918) for client backup, policy testoracle, schedule
Default-Application-Backup
05/12/2007 00:37:10 backup backup starting backup job (jobid=918)
05/12/2007 00:40:05 backup backup begin writing backup id backup_1178901430, copy 1, fragment 1, to media id BBT247 on drive index
0
05/12/2007 00:40:26 backup backup successfully wrote backup id backup_1178901430, copy 1, fragment 1, 288 Kbytes at 25.575
Kbytes/sec
05/12/2007 00:40:27 backup backup CLIENT backup POLICY testoracle SCHED Default-Application-Backup EXIT STATUS 0 (the requested
operation was successfully completed)
05/12/2007 00:40:28 backup - database backup is currently disabled
05/12/2007 00:40:28 backup - running session_notify
05/12/2007 00:40:28 backup - cleaning image DB
05/12/2007 00:40:29 backup - Cleanup running in background, pid=622
05/12/2007 00:40:29 backup - Deleting Expired Images
05/12/2007 00:40:29 backup - cleaning media DB(s)
05/12/2007 00:40:29 backup - deleted 0 expired records, compressed 0, tir removed 0, indexed 0, deleted 0 expired copies
05/12/2007 00:41:10 backup backup client backup handling path /c-1920405094-20070512-00
05/12/2007 00:41:10 backup - running session_start_notify
05/12/2007 00:41:11 backup - started backup job (jobid=919) for client backup, policy testoracle, schedule
Default-Application-Backup
05/12/2007 00:41:11 backup backup starting backup job (jobid=919)
05/12/2007 00:41:29 backup backup begin writing backup id backup_1178901671, copy 1, fragment 1, to media id BBT247 on drive index
0
05/12/2007 00:41:53 backup backup successfully wrote backup id backup_1178901671, copy 1, fragment 1, 7200 Kbytes at 499.792
Kbytes/sec
05/12/2007 00:41:54 backup backup CLIENT backup POLICY testoracle SCHED Default-Application-Backup EXIT STATUS 0 (the requested
operation was successfully completed)
05/12/2007 00:41:55 backup - database backup is currently disabled
05/12/2007 00:41:55 backup - running session_notify
05/12/2007 00:41:55 backup - cleaning image DB
05/12/2007 00:41:56 backup - Cleanup running in background, pid=3050
05/12/2007 00:41:56 backup - Deleting Expired Images
05/12/2007 00:41:56 backup - cleaning media DB(s)
05/12/2007 00:41:56 backup - deleted 0 expired records, compressed 0, tir removed 0, indexed 0, deleted 0 expired copies
05/12/2007 00:44:29 backup backup client backup handling path /0uihgbn8_1_1
05/12/2007 00:44:29 backup - running session_start_notify
05/12/2007 00:44:29 backup - started backup job (jobid=920) for client backup, policy testoracle, schedule
Default-Application-Backup
05/12/2007 00:44:29 backup backup starting backup job (jobid=920)

(B)ack (F)orward (U)p (D)own (Q)uit

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-69350/,如需轉載,請註明出處,否則將追究法律責任。

相關文章