bpdbjobs
| Article:HOWTO43650 | | | Created: 2011-03-07 | | | Updated: 2011-03-07 | | | Article URL http://www.symantec.com/docs/HOWTO43650 |
SYNOPSIS
[-report] [-M master_servers] [-ignore_parent_jobs] [ -vault | -lvault | -all_columns | -most_columns | -gdm ] [-file pathname] [-append] [-noheader] [-mastertime] [-jobid job1,job2,...jobn] [verbose]
-summary [-M master_servers] [-ignore_parent_jobs] [ -U | -L | -all_columns ] [-file pathname] [-append] [verbose]
-resume | -suspend | -delete | -cancel | -restart job1,job2,...jobn | type=jobtype | type=all [-M master_servers] [-quiet] [-reason "string"]
DESCRIPTION
bpdbjobs interacts with the jobs database and is useful in scripts or as a command-line administration tool. It prints the entire jobs database, prints a summary of the database, deletes done jobs, cancels incompleted jobs, and cleans old jobs.
To customize the output of bpdbjobs, add column definition entries (BPDBJOBS_COLDEFS) in the bp.conf file.
Refer to the NetBackup Administrator's Guide for UNIX and Linux, Volume II for more information about the following: the bp.conf file, a complete list of the definitions, and the BPDBJOBS_COLDEFS entries.
The -cancel, -delete, -jobid, -resume, and -suspend options all use the jobtype as a suboption. Enter one of the following as jobtype. (Letters following the capitalized letters are ignored.)
ALL | * REStore BACkup ARChive VERify DUPlicate IMPort LABel ERAse VAUlt TPReq CLEan FORmat INVentory QUAlification DBbackup | CATalogbackup
OPTIONS
- -all_columns
Displays all columns of a report or summary. Some of the more useful fields of this command are:
0=backup, 1=archive, 2=restore, 3=verify, 4=duplicate, 5=import, 6=catalog backup, 7=vault, 8=label, 9=erase, 10=tape request, 11=tape clean, 12=format tape, 13=physical inventory, 14=qualification, 15=database recovery, 16=media contents, 17=image delete, 18=LiveUpdate
0=queued, 1=active, 2=wait for retry, 3=done, 4=suspended, 5=incomplete
The policy that this job is associated with.
The schedule that this job is associated with.
0=immediate, 1=scheduled, 2=user-initiated, 3=quick erase, 4=long erase, 5=database backup staging, 6=database backup cold
0=full, 1=incr, 2=user backup, 3=user archive, 4=cumulative-incr
Priority that is assigned to this job as configured in the policy attributes.
The output of this command consists of a single line per backup job. Each line of the output is a comma-delimited list in the following format:
jobid,jobtype,state,status,policy,schedule,client,server ,started,elapsed,ended,stunit,try,operation,kbytes,files ,pathlastwritten,percent,jobpid,owner,subtype,classtype, schedule_type,priority,group,masterserver,retentionunits ,retentionperiod,compression,kbyteslastwritten,fileslast written,filelistcount,[files],trycount,[trypid,trystunit, tryserver,trystarted,tryelapsed,tryended,trystatus,trys tatusdescription,trystatuscount,[trystatuslines],trybyte swritten,tryfileswritten],parentjob,kbpersec,copy,robot, vault,profile,session,ejecttapes,srcstunit,srcserver,src media,dstmedia,stream,suspendable,resumable,restartable, datamovement,snapshot,backupid,killable,controllinghost
* 415,Backup,Done,96,jvlcc,vlcdiff,mule,buffalo,0885942000,0000000014, 0885942014,8mm,3,,,,,,11602,root,1,0,1,10,,buffalo,2,1,0,0,0,3,/home/vlc/ jadm_JAVA/usr/openv/java,/home/vlc/directory with spaces,/home/vlc/test, 3, 11544,8mm,buffalo,885941970,13,885941983,96,unable to allocate new media for backup\, storage unit has none available,2,01/27/98 16:59:30 - connecting, 01/27/98 16:59:30 - connected;connect time: 000:00:00,0,0, 11573,8mm,buffalo,885941986,11,885941997,96,unable to allocate new media for backup\, storage unit has none available,2,01/27/98 16:59:40 - connecting,01/27/98 16:59:40 - connected; connect time: 000:00:00,0,0, 11602,8mm,buffalo,885942000,14, 885942014,96,unable to allocate new media for backup\, storage unit has none available,2,01/27/98 17:00:00 - connecting,01/27/98 17:00:00 - connected; connect time: 000:00:00,0,0
Refer to Example 1 for an example on how to interpret the -all_columns output.
- -append
Appends the output to the file that the -file option specifies. If no -file option is provided, the output goes to stdout.
- -cancel job1,job2,...jobn |type=jobtype|type=all
Causes bpdbjobs to cancel active jobs cleanly that appear with a Status 150 in the Activity Monitor. For example:
bpdbjobs -cancel 11328 bpdbjobs -cancel 11328,11329,11330
Possible jobtype values are listed in the Description section.
- -cancel_all
Causes bpdbjobs to cleanly cancel all incomplete jobs that appear with a Status 150 in the Activity Monitor. For example:
bpdbjobs -cancel_all
- -change_priority_by [-M master_servers] -priority number -jobid job1,job2,...jobn
- -clean
Causes bpdbjobs to delete the completed jobs that are older than a specified time period. Use with the -keep_hours or -keep_days, or -keep_successful_hours or -keep_successful_days parameters to specify a retention period. For example:
bpdbjobs -clean -keep_hours 30
- -delete job1,job2,...jobn |type=jobtype|type=all
Deletes the completed jobs that appear in the Activity Monitor. Multiple job IDs can be deleted in one command. For example:
bpdbjobs -delete 11328,11329,11330
Possible jobtype values are listed in the Description section.
- -fast
Retrieves the job metadata from bpjobd, but the
tryfile andfilesfile is read directly from the file system. This option is ignored if bpdbjobs is started from a remote host (a host that is not the master).- -file pathname
Names a file to which the output of bpdbjobs is written. If no -file option is provided, the output goes to stdout.
- -gdm
Displays less of the information in a report than -most_columns.
- -ignore_parent_jobs
Ignores the parent jobs for the -report and -summary options.
- -jobid job1,job2,...jobn |type=jobtype|type=all
Possible jobtype values are listed in the Description section.
- -keep_days days
Used with the -clean option to specify how many days bpdbjobs keeps completed jobs. Default is three (3) days.
- -keep_hours hours
Used with the -clean option to specify how many hours bpdbjobs keeps completed jobs. Default is 72 hours.
- -keep_successful_days days
Used with the -clean option to specify how many days bpdbjobs keeps successful completed jobs. Default is three (3) days.
- -keep_successful_hours hours
Used with the -clean option to specify how many hours bpdbjobs keeps successful completed jobs. Default is 72 hours.
- -L
- -lvault
- -M master_servers
Applies to an environment with multiple master servers. Use the -M option to summarize jobs, delete jobid(s), cancel jobid(s), and cancel all active job IDs for a specific master server:
- -mastertime
By default, bpdbjobs translates the start or the end times to be relative to the local clock. A job that starts 10 minutes ago looks like it starts 10 minutes ago regardless of time zone and clock differences with the master server. This option, however, circumvents that translation so that time values are consistent between admin clients.
- -most_columns
Behaves similarly to -all_columns but does not print the file list or any information on previous attempts. The -most_columns option is significantly faster than -all_columns.
- -noheader
- -quiet
Cancels the reporting of the number of jobs resumed/suspended/deleted/canceled.
- -reason "string"
Indicates the reason why you are performing this command action. The reason text string that you enter is captured and appears in the audit report. The string must be enclosed by double quotes ("...") and cannot exceed 512 characters. It cannot begin with a dash character (-) nor contain a single quotation mark (').
- -report
Provides a report of data that is stored in the Activity Monitor. If no option is specified with bpdbjobs, -report is the default option.
- -restart job1,job2,...jobn |type=jobtype|type=all
Cleanly restarts a job that jobtype indicates. This option supports backups and enables you to restart a job by typing the word BACkup in the Activity Monitor.
- -resume job1,job2,...jobn |type=jobtype|type=all
Resumes the jobs that job1,job2,...jobn specify, all eligible checkpoint backups or restore the jobs that jobtype indicates, or all eligible jobs if type=all is specified.
Possible jobtype values are listed in the Description section.
- -set_priority [-M master_servers] -priority number -jobid job1,job2,...jobn
Sets the priority of the specified job or jobs to the specified priority number.
- -summary [-U | -L | -all_columns]
Prints a summary line to stdout for all the jobs that are stored in NBU/jobs. Parameters -U and -L format the output of the command. Use the -file option to write the output to a given directory or file name. For example:
bpdbjobs -summary -U -file /tmp/summary.out
- -suspend job1,job2,...jobn |type=jobtype|type=all
Suspends the jobs that job1,job2,...jobn specifies or all eligible checkpoint backups or restore the jobs that jobtype indicates, or all eligible jobs if type=all is specified.
Possible jobtype values are listed in the Description section.
- -U
Reports in user format. NetBackup report-generating tools such as the NetBackup-Java Reports application uses this report format.
- -vault
- -verbose
Causes bpdbjobs to log additional information in the debug log in the following directory, if the directory exists:
/usr/openv/netbackup/logs/bpdbjobs/*
- -version
Prints the version string, then halts. Any other switches are ignored.
EXAMPLES
This example shows the following: sample logic to decode -all_columns output to produce the backup initiation time of a job that succeeded, but not on the first try.
Field 9 = start time (The time the job was first queued.)
This time is of little value unless you want to know when the job was queued.
Up to Field 32, all fields are fixed. Then Field 32 tells you how many entries are in the filelist fields.
Field 32 = filelistcount (The number of files that are listed in the filelist.)
Add that value to 33 to determine the field that shows the number of tries:
Field 33 + filelistcount = trycount (The number of tries that occurred.)
If there is only one try, calculate the following to determine its start time:
Field 33 + filelistcount + 4 = [first]trystarted (The start time of the first try.)
If there are two tries, go past the status entries. First, calculate the number of entries in the status field:
Field 33 + filelistcount + 9 = trystatuscount (The number of status entries in the first try.)
Then, to get the start time of the second try, calculate the following:
Field 33 + filelistcount + 9 + trystatuscount + 6 = [second] trystarted
|
|
Legacy ID
v14660746_v55366869
Article URL http://www.symantec.com/docs/HOWTO43650
Terms of use for this information are found in Legal Notices









Thank you.