cancel
Showing results for 
Search instead for 
Did you mean: 

Command to know Failed Backups

Sahil_Joshi
Level 4

Hi All,

I want to see the backups which failed in past 24 hours through a command.

When i use bperror -backstat -U -hoursago 24 | grep -v 0 , i get all the failed backups which were failed in past 24 horus.But the output contains even the backups which were successfull later on.

So, is there any way where i can see only the failed backups and which are not successfull later on. If any backups are successfull later on those shouldn't be displayed.

Thanks and Regards,

Sahil

 

 

 

 

 

 

 

7 REPLIES 7

Ashish-Sharma
Level 6
Accredited

Below command will display the list of Successfull Jobs and Failed Jobs with the Status Code:

/usr/openv/netbackup/bin/admincmd/bperror -U -backstat -s info -hoursago <Duration> -M <Master Server>

Eg:

/usr/openv/netbackup/bin/admincmd/bperror -U -backstat -s info -hoursago 2 -M zeus.

Above Command will display the backup jobs completed and failed for zeus master server in last 2 hours

Ashish-Sharma
Level 6
Accredited

Sahil_Joshi
Level 4

Thanks Ashish,

Yes the command will display the Backup job failed in past two hours.

Consider an ex:

PolicyA failed by error 96 in the past 2 hours.

Tapes were inserted and again PolicyA is refired and is successfull.

But now when i run the bperror command then both the statuses would be displayed in the output. one which was failed by 96 and other which was successful by 0

In the above case, i am not expecting to see any output since my backup is successfull.

I only want to see the ouput if the backup job is failed and is not successfull later on.

Regards,

Sahil Joshi

revarooo
Level 6
Employee

Sahil,

This works for me:

bperror -backstat -U -hoursago 24| grep -v "^  0 "

 

 
note the quoted string in the grep, this basically says exclude anything at the beginning of a line with 2 spaces and a 0 followed by a space (a successful backup)
 
 
you mention "I only want to see the ouput if the backup job is failed and is not successfull later on."
This is achievable but would need more complex scripting.
 
Hope this helps.

Yogesh9881
Level 6
Accredited

have you tried filters in GUI activity monitor ?

 

Sahil_Joshi
Level 4

Thanks Revaroo,

Will work on scripting since there is no other way..!

 

revarooo
Level 6
Employee

Sahil, you're welcome.

You may also want to look into OpsCenter and how that can help you in reporting.

Could you mark one of the posts above, that helped you most, as solution as well.