Video Screencast Help

Custom Reporting with parent_end_notify

Created: 11 Feb 2013 • Updated: 16 Feb 2013 | 3 comments
This issue has been solved. See solution.

I have created a custom Perl script to handle notifications of backup job alerts, but I am having rough time actually getting it processed!

For example, in parent_end_notify, I have:

@ECHO C:\Perl64\bin\perl.exe C:\NetBackup\Scripts\ %1 %2 %3 %4 %5 > C:\Temp\parent_end_notify.txt
C:\Perl64\bin\perl.exe C:\NetBackup\Scripts\ %1 %2 %3 %4 %5

The first line is simply a debug line that I am using to figure out what is actually ocurring... And believe it or not, it is the ONLY one that is working! As to the second line, the actual notification script, this command is completely skipped. I have debug code plastered all in that script and none of those are ever triggered (even a "hello world" at the beginning of the file is never processed).

I can run this perl script from the command line and from a scheduled task (as the Local System account) and it works fine -- but, when I put it into the parent_end_notify or backup_end_notify scripts, the script call is completely ignored.

For the record, I have also tried running cmd /C <perl script> from within either NBU end script to no avail...

And in case it helps, here is the output of the @ECHO line from above after being called from parent_end_notify:

C:\Perl64\bin\perl.exe C:\NetBackup\Scripts\ XXXBACKUP1 FILE-TO-TAPE FULL-Yearly FULL 0

(Copy and paste this right to the command line and it works fine!!, but the perl script was never triggered by the script).

Any suggestions?

Any way to debug the notification script?

Thanks so much!


Comments 3 CommentsJump to latest comment

RamNagalla's picture


please remove the1st line for test and keep 2nd line as 1st one and see if that works( i guess it will not work, but just to make sure)

if that does not work, its more likely permission issue on the 2nd line  script.

what is the user ID that is being used to run the netbackup serverics?

does that same ID have the permission to run the script?

when you manually run the script run on your user id, but when it try to trigger from Netbackup that would be user id being used by netbackup, 

so please make sure with the user ID that is being used by Netbckup. and see how it works.

JustN's picture

Thanks for the reply... I am absolutely certain it has something to do with the user id being used by NetBackup, which should be the Local System account, as that is what is used to start the Windows service.

The puzzling part is, I created a new scheduled task and assigned the user ID to Local System and it works just fine!

... And the SYSTEM account has full rights to execute the script ...

JustN's picture

Thanks for the help Nagalla...

I was never able to find a "true" solution to the problem, that is, I could never pin-point exactly what the script issue was with Windows... Since we are very early in our deployment, I was able to rebuild the master server on a Redhat Enterprise Linux server (same IP address, same hardware) and my custom e-mail alerting script started working immediately...

Many thanks!