Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

command to get the stat and end time of a client backup

Updated: 22 Mar 2012 | 12 comments
NIKHIL2346565959's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

Hi,

Can anybody know the command to get the stat and end time of a client backup .

Comments

NIKHIL2346565959's picture
06
Feb
2012
0 Votes 0
Login to vote

  i am looking for a command

 

i am looking for a command to list the backups information (as in the activity monitor)

like

client >>>> $7

start time >>>> $9

end time >>>> $11

active elapsed time >>>> $10

status >>>> $4

 

Plz provide the awk script or command for this?

Marianne van den Berg's picture
06
Feb
2012
0 Votes 0
Login to vote

Parse bpdbjobs

Parse bpdbjobs output.

http://www.symantec.com/docs/HOWTO43650

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows.
Handy NBU links

NIKHIL2346565959's picture
06
Feb
2012
0 Votes 0
Login to vote
Mark_Solutions's picture
06
Feb
2012
0 Votes 0
Login to vote

As per the tech note Marianne

As per the tech note Marianne gave the link to above ....

Just run the bpdbjobs command with the switches you require - read through the tech note

Authorised Symantec Consultant

Don't forget to give a "Thumbs Up" or mark as "Solution" if someones advice has helped you.

Marianne van den Berg's picture
06
Feb
2012
0 Votes 0
Login to vote

It seems you have found this

It seems you have found this post:

https://www-secure.symantec.com/connect/forums/re-...

'parse' means that you can use shell commands such as grep and awk to extract specific info.

If you google
netbackup bpdbjobs awk
you will be guaranteed to find some examples!

You can also do a 'man awk' from cmd to learn what awk can do for you.
 

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows.
Handy NBU links

Amarnath Sathishkumar's picture
22
Mar
2012
0 Votes 0
Login to vote

Please Check

Is the command Given is right.

If I execute this Im not getting any output.

/usr/openv/netbackup/bin/admincmd/bpdbjobs -all_columns | awk '{print $7, $9, $11, $10, $4}'

Amarnath Sathishkumar

If this comment is helpfull, Don't forget to give a "Thumbs Up" or mark as "Solution"

wr's picture
22
Mar
2012
2 Votes +2
Login to vote

should work

try   bpdbjobs -all_columns | awk -F","  '{print $7, $9, $11, $10, $4}'

good Will backing-up

Amarnath Sathishkumar's picture
23
Mar
2012
1 Vote -1
Login to vote

Error executing the Command

 

Hi wr,
 
I have executed the command given by you and I'm getting the error as below,
 
zeus# /usr/openv/netbackup/bin/admincmd/bpdbjobs -all_columns | awk -F","  '{print $7, $9, $11, $10, $4}'
awk: record `1049055,0,3,0,ECOLLP...' too long
zeus#

Amarnath Sathishkumar

If this comment is helpfull, Don't forget to give a "Thumbs Up" or mark as "Solution"

NIKHIL2346565959's picture
24
Mar
2012
0 Votes 0
Login to vote

  -bash-3.2$ sudo ./bpdbjobs

 

-bash-3.2$ sudo ./bpdbjobs -all_columns | awk -F","  '{print $7, $9, $11, $10, $4}'

 

 1332494446 0000000000 0000000424

 1332494446 0000000000 0000000424

 1332494446 0000000000 0000000424

 1332494446 0000000000 0000000424

lxyump 1332494492 1332494808 0000000316 0

 1332494032 0000000000 0000000838

lxyump 1332494058 0000000000 0000000812

 

lxyump34   1332493981 133

 

What is this?

NIKHIL2346565959's picture
08
Apr
2012
0 Votes 0
Login to vote

please update on this?

please update on this?

mph999's picture
08
Apr
2012
0 Votes 0
Login to vote

It is the 7th, 9th 11th 10th

It is the 7th, 9th 11th 10th and 4th fields of the comma separate output of the bpdbjobs -all_columns command.

However, the lines can be very long, and awk sometimes will not work.

 

If I run bpdbjobs -most_columns - these are the first 11 columns

384,0,3,237,womble_ad_disk,Full,*NULL*,,1333911123,0000000000,1333911123

These are ...

jobid,jobtype,state,status,class,schedule,client,server,started,elapsed,ended

I think this is better :

NOTE :  THIS WILL ONLY WORK ON UNIX ... (awk does not work on windows)

 bpdbjobs -most_columns |awk -F, '{print $1" "$5" "$6" "$9" " $11}'

This command gives the 1, 5th, 6th, 9th and 11th fields which from the descriptions are :

jobid  class/ policy  schedule  start time  end time

The output looks like this :

 

bpdbjobs -most_columns |awk -F, '{print $1" "$5" "$6" "$9" " $11}'
 
384 womble_ad_disk Full 1333911123 1333911123
383 womble_ad_disk Full 1333910914 1333910940
382   1333890199 1333890202
381   1333846995 1333846998
380   1333803792 1333803795
379   1333760589 1333760599
378 flump Full 1333724587 1333724600
377   1333717385 1333717388
376   1333674181 1333674192
375 CatBack_Disk Full 1333645255 1333645270
374 CatBack_Disk Full 1333645222 1333645250
373 CatBack_Disk Full 1333645201 1333645251
372 CatBack_Disk - 1333645200 1333645270
 
For some lines we see only a jobid and times, these are probably image cleanups,  jobid 372 is a parent job for the catalog backup, so there is no 'schedule' shown.
 
Basically, you are not going to easily get a perfect output - but I think this is good enough  as it is very easy to read down and just pick out the lines that are relevant .
 
To convert the times (the long numbers) you can use bpdbm -ctime <ctime>
 
For example :
 
bpdbm -ctime 1333911123
1333911123 = Sun Apr  8 19:52:03 2012
 
 
Martin
NIKHIL2346565959's picture
09
Apr
2012
0 Votes 0
Login to vote

HI,   Is there a command to

HI,

 

Is there a command to get the time in Sun Apr  8 19:52:03 2012 format when i run bpdbjobs.