<admin_dir_path>bpdbjobs [-report] [-M master_servers] [-ignore_parent_jobs] [ -vault | -lvault | -all_columns | -most_columns | -gdm ] [-file pathname] [-append] [-noheader] [-mastertime] [-jobid job1,job2,...jobn] [verbose]
<admin_dir_path>bpdbjobs -summary [-M master_servers] [-ignore_parent_jobs] [ -U | -L | -all_columns ] [-file pathname] [-append] [verbose]
<admin_dir_path>bpdbjobs -resume | -suspend | -delete | -cancel | -restart job1,job2,...jobn | type=jobtype | type=all [-M master_servers] [-quiet]
<admin_dir_path>bpdbjobs -clean [-M master_servers] [ -keep_hours hours | -keep_days days ] [ -keep_successful_hours hours | -keep_successful_days days ] [verbose]
<admin_dir_path>bpdbjobs -change_priority_by [-M master_servers] -priority number -jobid job1,job2,...jobn
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
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.
Appends the output to the file that the -file option specifies. If no -file option is provided, the output goes to stdout.
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.
Causes bpdbjobs to cleanly cancel all incomplete jobs that appear with a Status 150 in the Activity Monitor. For example:
bpdbjobs -cancel_all
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
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.
Names a file to which the output of bpdbjobs is written. If no -file option is provided, the output goes to stdout.
Displays less of the information in a report than -most_columns.
Ignores the parent jobs for the -report and -summary options.
Possible jobtype values are listed in the Description section.
Used with the -clean option to specify how many days bpdbjobs keeps completed jobs. Default is three (3) days.
Used with the -clean option to specify how many hours bpdbjobs keeps completed jobs. Default is 72 hours.
Used with the -clean option to specify how many days bpdbjobs keeps successful completed jobs. Default is three (3) days.
Used with the -clean option to specify how many hours bpdbjobs keeps successful completed jobs. Default is 72 hours.
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:
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.
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.
Cancels the reporting of the number of jobs resumed/suspended/deleted/canceled.
Provides a report of data that is stored in the Activity Monitor. If no option is specified with bpdbjobs, -report is the default option.
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.
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.
Sets the priority of the specified job or jobs to the specified priority number.
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
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.
Reports in user format. NetBackup report-generating tools such as the NetBackup-Java Reports application uses this report format.
Causes bpdbjobs to log additional information in the debug log in the following directory, if the directory exists:
Prints the version string, then halts. Any other switches are ignored.
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