command to get the stat and end time of a client backup
Hi,
Can anybody know the command to get the stat and end time of a client backup .
try bpdbjobs -all_columns | awk -F"," '{print $7, $9, $11, $10, $4}'
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 1333911123383 womble_ad_disk Full 1333910914 1333910940382 1333890199 1333890202381 1333846995 1333846998380 1333803792 1333803795379 1333760589 1333760599378 flump Full 1333724587 1333724600377 1333717385 1333717388376 1333674181 1333674192375 CatBack_Disk Full 1333645255 1333645270374 CatBack_Disk Full 1333645222 1333645250373 CatBack_Disk Full 1333645201 1333645251372 CatBack_Disk - 1333645200 1333645270For 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 13339111231333911123 = Sun Apr 8 19:52:03 2012Martin