cancel
Showing results for 
Search instead for 
Did you mean: 

need a linux script

noazara
Level 6
   VIP   

Hi Team,

 

I need a script which can list what all are the failures in the environment in last 24 hrs 

And which i run will automatically trigger those failed backups

 

NBU 9.1

 

Linux

7 REPLIES 7

noazara
Level 6
   VIP   

I need a script which will perform both above task for me.

sshagent
Level 4

Go take a look at the output of bpdbjobs  ( /usr/openv/netbackup/bin/admincmd/bpdbjobs ) for a jobs view, with status codes etc. 

Or if you want specific error codes /usr/openv/netbackup/bin/admincmd/bperror -hoursago 24 -problems
That will be very noisy.

Or perhaps more useful and less noisy, and probably more like what you want. 

/usr/openv/netbackup/bin/admincmd/bperror -hoursago 24 -backstat -by_statcode -U

Start with that, and then you can refine things. 

noazara
Level 6
   VIP   

Thanks a lot.

 

My concern here is i also need a coomand which can fire the failures fetched from the bperror command

 

it should check whether backup has run or not, it shoould trigger only that failed jobs

 

I need all that in one single script which i can schedule in cron or can run manually

 

 

noazara
Level 6
   VIP   

please need help on this

sshagent
Level 4

I didn't really want to write scripts for people, as that only triggers more questions on some basic scripting functionality. 
I provided the info in my post.  You can use some coding logic of your own (to be learnt possibly), then perhaps do some /usr/openv/netbackup/bin/bpbackup -i -p <policy> -s <schedule> if when mention about "firing jobs" you mean starting the backup job manually. 

I think you want to spend some time doing some shell scripting tutorials, assuming you've got a linux environment.  If not, probably want to look at powershell
best of luck

noazara
Level 6
   VIP   

Thanks  sshagent

 

If you can provide one time Linux script,that would be really helpful.

 

 

 

DPeaco
Moderator
Moderator
   VIP   

I'm sorry but rerunning an already failed backup job can only create more problems than it can fix most times. There are reasons why backups fail and NetBackup, by default, tries a backup 3 times before truly failing the job. This should be an indicator to you that some research into why the backup failed is needed before the next backup attempt.

Thanks,
Dennis