Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating/exporting a report

Status
Not open for further replies.

teakandme

MIS
Jun 10, 2004
57
US
Is there a way to query the database to pull a report on backup failures/success (historical purposes)
 

bpdbjobs -report



Bob Stump
VERITAS
"Ain't it the truth? Ain't it the truth?" Bert Lahr, Wizard of Oz 1939
 
Bob,

What options do you need to add to get:
STATUS CLIENT POLICY SCHED SERVER TIME COMPLETED KBYTES ELAPSED TIME KBYTES/Sec

I've been banging my head against the wall for days on this. Man pages and various scripts aren't getting me there. I fail to see why most posts say export activity monitor for this data. Defeats the automation of Unix.

NB6.0 MP4
 
DOCUMENTATION: How to customize the output of the bpdbjobs -report command with a Windows Master Server.

Details:
The method in which the format of the bpdbjobs report is controlled changed in VERITAS NetBackup (tm) 4.5. This is now controlled by adding BPDBJOBS_COLDEFS entries to the /usr/openv/netbackup/bp.conf file on the master server.

Add a BPDBJOBS_COLDEFS entry for every column you wish to include in the output using the following format:

BPDBJOBS_COLDEFS = COLDEFS_ENTRY [minimum_size [true | false]]

where:
COLDEFS_ENTRY is the name of the column to include in the output.
See the table below for valid BPDBJOBS_COLDEFS entries.
minimum_size is the minimum column width.
If not specified, the default is a width of 5.
true indicates that the column should expand as needed.
If not specified, true is the default.
false indicates that the column should not expand beyond the minimum_size.
Any entries larger than the minimum_size will be truncated.

Note: For the BPDBJOBS_COLDEFS option to be recognized, the minimum_size must be present when setting a value for [true | false]. Invalid options will be ignored in the bp.conf file.
Valid options:
BPDBJOBS_COLDEFS = JobID
BPDBJOBS_COLDEFS = JobID 5
BPDBJOBS_COLDEFS = JobID 5 true
Invalid option:
BPDBJOBS_COLDEFS = JobID true

The order of the entries determines the order that the column headings will appear when bpdbjobs is run. The NetBackup daemons do not need to be restarted for these options to take effect. Simply add the option to the bp.conf file, save, and then re-run the bpdbjobs command.

Sample entries in the bp.conf file:

Note that these are the default columns for NetBackup 4.5 and 5.x. Also note that if there is only one BPDBJOBS_COLDEFS entry in the bp.conf file, there will only be one column in the output from bpdbjobs. Thus, adding at least one entry to bp.conf will remove all defaults in favor of the bp.conf list. Therefore, specify all the columns necessary to get the required output. To restore the default options for bpdbjobs, remove all BPDBJOBS_COLDEFS entries from the bp.conf file.

BPDBJOBS_COLDEFS = JobID 5 true
BPDBJOBS_COLDEFS = Type 4 true
BPDBJOBS_COLDEFS = State 5 true
BPDBJOBS_COLDEFS = Status 6 true
BPDBJOBS_COLDEFS = Policy 6 true
BPDBJOBS_COLDEFS = Schedule 8 true
BPDBJOBS_COLDEFS = Client 6 true
BPDBJOBS_COLDEFS = DstMedia_Server 12 true
BPDBJOBS_COLDEFS = ActPID 10 true

The default output will look like this:

# /usr/openv/netbackup/bin/admincmd/bpdbjobs
JobID Type State Status Policy Schedule Client Dest Media Svr Active PID
1 Backup Done 0 test1 full firefly firefly 15965

A bp.conf file with the following entries:

BPDBJOBS_COLDEFS = JobID 5 true
BPDBJOBS_COLDEFS = Type 4 true

will result in the output with only these two columns:

# /usr/openv/netbackup/bin/admincmd/bpdbjobs
JobID Type
1 Backup


Table of valid bp.conf entries:
Note that these entries are case insensitive so "JobID" is the same as "JOBID."

4.5 Entries 5.x Entries Description
ACTIVEELAPSED - Active Elapsed (elapsed active time)
ACTPID - Active PID (PID of job)
n/a BACKUPID Backup ID
BACKUPTYPE - Backup Type
CLIENT - Client
COMPLETION - Completion (percent complete)
COMPRESSION - Compression (yes or no)
n/a DATAMOVEMENT Data movement
DSTMEDIA_SERVER - Dest Media Svr (writing media server)
DSTMEDIAID - Dest Media ID (writing media ID)
DSTSTORAGE_UNIT - Dest StUnit (writing storage unit)
ELAPSED - Elapsed (elapsed time)
ENDED - Ended
ESTFILE - Est File (estimated number of files)
ESTKB - Est KB (estimated number of kilobytes)
FILES - Files
n/a FROZENIMAGE Is a Frozen image?
GROUP - Group
n/a IMAGEID Image ID
JOBID - JobID
JOBSTVERSION - Job Strucuture Version
KBPERSEC - KB Per Sec
KILOBYTES - Kilobytes
LASTBACKUP - Last Backup (date and time)
MAINPID - Main PID (PID spawning job, if applicable)
NUMTAPESEJECT - Media to Eject (number of tapes to eject; Vault only)
OPERATION - Operation (current operation)
OWNER - Owner
PARENTJOBID - Parent JobID
PATHNAME - Pathname
POLICY - Policy
POLICYTYPE - Policy Type
PRIORITY - Priority
PRODUCT - Product
PROFILE - Profile (Vault only)
n/a RESTARTABLE Is restartable?
RESUMABLE (4.5 FP3 and higher) RESUMABLE Is resumable?
RETENTION - Retention (retention period)
ROBOT - Robot (Vault only)
RQSTPID - Request PID (PID requesting job, if applicable)
SCHEDULE - Schedule
SCHEDULETYPE - Schedule Type
SESSIONID - Session ID (Vault only)
SRCMEDIA_SERVER - Src Media Svr
SRCMEDIAID - Src Media ID
SRCSTORAGE_UNIT - Src StUnit
STARTED - Started
STATE - State
STATUS - Status
STREAMNUMBER - Stream Number
n/a SUBTYPE Subtype
SUSPENDABLE (4.5 FP3 and higher) SUSPENDABLE Is Suspendable?
TRY ATTEMPT Attempt
TYPE - Type (job type)
VERSION - Version number
VAULT - Vault only



Bob Stump
VERITAS
"Ain't it the truth? Ain't it the truth?" Bert Lahr, Wizard of Oz 1939
 
What options do you need to add to get:
STATUS CLIENT POLICY SCHED SERVER TIME COMPLETED KBYTES ELAPSED TIME KBYTES/Sec

maybe something like this?

BPDBJOBS_COLDEFS = Status 6 true
BPDBJOBS_COLDEFS = Client 6 true
BPDBJOBS_COLDEFS = Policy 6 true
BPDBJOBS_COLDEFS = Schedule 8 true
BPDBJOBS_COLDEFS = Server 6 true
BPDBJOBS_COLDEFS = Ended 6 true
BPDBJOBS_COLDEFS = KILOBYTES 6 true
BPDBJOBS_COLDEFS = ELAPSED 6 true
BPDBJOBS_COLDEFS = KBPERSEC 6 true




Bob Stump
VERITAS
"Ain't it the truth? Ain't it the truth?" Bert Lahr, Wizard of Oz 1939
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top