cancel
Showing results for 
Search instead for 
Did you mean: 

How to launch a script when a parent backup job is finished

jim_de_sitter
Level 2

Hi,

I want to launch a script when one of my NDMP backups is finished.
It's an NDMP policy with multiple backup selections and "multiple streams" is enabled to reduce the backup window.

I've found some scripts that are triggered at the end of an NDMP job : ndmp_end_notify and ndmp_end_path_notify.

But my problem is : due to the multiple streams, a parent backup job is launched and a child job is kicked of for each backup selection.
And those scripts are called at the end of each child job, but they are not called at the end of the parent job.

I want to do actions when the whole job is finished with exit 0. So I'm not interrested in the exit code of each individual backup stream, I want to have the exit status of the complete job

Does anyone has a suggestion for me?

Thanks
Jim

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Level 6
Partner    VIP    Accredited Certified

On the master you will find parent_end_notify script. Sample script in goodies folder that can be copied to the bin folder.

If this script is activated and configured, it will send notification for ALL parent jobs, unless the script is customized for the one policy that you need notification for.

See how JH has used this script to only send email for Catalog policy:

https://www-secure.symantec.com/connect/forums/netbackup-656-saving-dr-file-tape#comment-4543891

 

View solution in original post

2 REPLIES 2

Marianne
Level 6
Partner    VIP    Accredited Certified

On the master you will find parent_end_notify script. Sample script in goodies folder that can be copied to the bin folder.

If this script is activated and configured, it will send notification for ALL parent jobs, unless the script is customized for the one policy that you need notification for.

See how JH has used this script to only send email for Catalog policy:

https://www-secure.symantec.com/connect/forums/netbackup-656-saving-dr-file-tape#comment-4543891

 

jim_de_sitter
Level 2

As simple as that...
Of course, the parent job is running on the masterserver, the datastream jobs are running on the mediaserver. And my script was sitting on the mediaserver...

Thanks so very much!

Regards

Jim