01-20-2009 07:32 AM
I picked up this handy little command recently to print out backup failures for the last 24 hours:
bperror -backstat -U | awk '($1 > 1) {print $0}'
is there any way to take the 2nd and subsequent attempts in to account as in the large amount of cases when I check the activity monitor to troubleshoot i find that the job was successful?
(Or to display the number of attempts in the output)
Thanks
Solved! Go to Solution.
01-20-2009 07:44 AM
You could always run the command again for each of your 'failed' clients but without the filter for status code:
bperror -backstat -U -client client_name
This would then give you all the backups (successful & failed) for that particular client.
***Edit***
Altho' you cannot differentiate between different streams (e.g. C:, D:, etc etc) so you couldn't specifically say from this which stream was successful, which one failed, restarted & was then successful or just failed outright.
***End of Edit***
You may also be able to utilise the list by stat_code first:
bperror -backstat -U -by_statcode
01-20-2009 07:44 AM
You could always run the command again for each of your 'failed' clients but without the filter for status code:
bperror -backstat -U -client client_name
This would then give you all the backups (successful & failed) for that particular client.
***Edit***
Altho' you cannot differentiate between different streams (e.g. C:, D:, etc etc) so you couldn't specifically say from this which stream was successful, which one failed, restarted & was then successful or just failed outright.
***End of Edit***
You may also be able to utilise the list by stat_code first:
bperror -backstat -U -by_statcode
01-20-2009 07:58 AM
Thanks Andy
I was kind of hoping for something simpler but I guess i can script that. I'll try and remember to post here when i've done it.
Ray
01-20-2009 08:01 AM
If you are looking for the number of attempts (retries) then bperror will not give you that information.
try bpdbjobs
01-20-2009 08:21 AM
Just a bit more for you to look at (may give you some ideas if nothing else):
Find your failed clients as above.
Determine the job ids for this client (there may well be duplicates here as it retries):
bperror -backstat -client client | cut -d " " -f6
Then run the following for each job id:
bperror -backstat -U -jobid job_id
So you can see whether a job restarted & failed or succeeded (hopefully!)
Well you said you were going to script something, so ...