Video Screencast Help

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

Created: 22 Mar 2012 • Updated: 23 Mar 2012 | 2 comments
This issue has been solved. See solution.


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?


Comments 2 CommentsJump to latest comment

Marianne's picture

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:

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

SOLUTION's picture

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!