cancel
Showing results for 
Search instead for 
Did you mean: 

Find all children for a parent job using command line

ClaireW
Level 2

Using the command line only, I need to be able to find all the children of a particular parent job.

This is for a perl script that raises tickets for failures automatically, and needs to raise them at the right level.

So far my only solution is to use bpdbjobs and list everything, then find those records with my parent in the "parent" field. This works, but I have 4000 jobs per night and I need to to this every time a job ends - be it parent or child - so even with the "time from <active-time>" option it's still a lot of processing.

Anyone have any ideas on how to achieve this more efficiently? I am new to Netbackup so may have missed an obvious trick, or perhaps there is a better command?

4 REPLIES 4

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

I am not a scripting expert, but if the Parent Job ID is known, then shell scripting options such as awk and grep can be used to locate only jobs with specific Parent Job #.
Or am I misinterpreting the requirement?

Genericus
Moderator
Moderator
   VIP   

NetBackup comes with a script it calls at the end of every job - backup_exit_notify

It should be in your bin directory under the installation path. It is designed to do exactly what you want.

I have already posted what I do with this, so it emails the appropriate group on job failures.

You can use boolean logic agains policy names and exit codes, so you can act on what you want.

No need to reinvent the wheel - just modify it to be what you want.

 

NetBackup 9.1.0.1 on Solaris 11, writing to Data Domain 9800 7.7.4.0
duplicating via SLP to LTO5 & LTO8 in SL8500 via ACSLS

I am actually using backup_exit_notify to catch the job-end notification. This will trigger on both parent and child jobs. I am running a multi-streamed mixed environment with unix, linux & windows filesystems and database applications especially Oracle so the parent/child relationship is not simple, especially when there are three generations such as with Intellegent Policies. I want to (1) raise a ticket for a failed client, but only one ticket! and (2) collect the total amount of data saved for the client for that backuptype, along with its start/stop/runtime stats. 

Data saved is only recorded at the lowest child level, so to get all the data for a host you need to know all its child jobs. I have been calling and combing the contents of bpdbjobs as suggested but in perl, but as I expect many multiples of thousands of job ends per night thats a lot of processing. So the question is - is there another way to find a parents children?

Genericus
Moderator
Moderator
   VIP   

Thanks for clarifying. I understand more, what you are trying to do - can you check with the DBA group? I think that they may have the ability to check the rman catalog or run a command that will tell information like % complete.

From within NetBackup it is a lot of adding bits together. You may find OpsCenter may be able to provide some custom reports to do what you are trying to do.

I am fortunate that all my backups complete successfully, and I do not have to provide this kind of reporting. 

Knock on wood - as I upgrade to 8.X ...

 

NetBackup 9.1.0.1 on Solaris 11, writing to Data Domain 9800 7.7.4.0
duplicating via SLP to LTO5 & LTO8 in SL8500 via ACSLS