cancel
Showing results for 
Search instead for 
Did you mean: 

command line, calculate Last Successful Job Ended, per policy

keithcascio
Level 3
Hi,

What is the most elegant, efficient way, using bp command line tools, to take a list of policies, for example the output of bppllist, and calculate "Last Successful Job Ended" for each?

Thanks,
Keith Cascio
1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6
you can use bppllist as you say to create your list of policy names.

These names could then be fed into, probably, any number of commands to give you the info you require.

e.g.
bppllist > bppllist.out
cat bppllist.out |
while read POLICY
do
bperror -U -backstat -s info  |  grep $POLICY  |  tail -1
done


This will produce a list showing the last job finish time for each policy (in last 24 hours). Obviously, if there is more than one client in the policy it will only show the one that finished last, not all.

e.g.
1    client2          Win2003_Servers      Tue_Diff      server       03/10/2010 03:53:16
1    client1          Win2008_Servers      Tue_Diff      server       03/09/2010 23:03:24
0    client3          Windows_ORACLE   Tue_Full     server       03/09/2010 11:57:00
0    client3          Windows_SQL            Wed_Full   server       03/10/2010 08:50:39

Not necessarily the most elegant, nor the most efficient, but .....

View solution in original post

3 REPLIES 3

Andy_Welburn
Level 6
you can use bppllist as you say to create your list of policy names.

These names could then be fed into, probably, any number of commands to give you the info you require.

e.g.
bppllist > bppllist.out
cat bppllist.out |
while read POLICY
do
bperror -U -backstat -s info  |  grep $POLICY  |  tail -1
done


This will produce a list showing the last job finish time for each policy (in last 24 hours). Obviously, if there is more than one client in the policy it will only show the one that finished last, not all.

e.g.
1    client2          Win2003_Servers      Tue_Diff      server       03/10/2010 03:53:16
1    client1          Win2008_Servers      Tue_Diff      server       03/09/2010 23:03:24
0    client3          Windows_ORACLE   Tue_Full     server       03/09/2010 11:57:00
0    client3          Windows_SQL            Wed_Full   server       03/10/2010 08:50:39

Not necessarily the most elegant, nor the most efficient, but .....

lu
Level 6
I posted something similar in Downloads: https://www-secure.symantec.com/connect/downloads/script-see-last-backup-date-all-clients

keithcascio
Level 3
 Thank you Andy and lu.