Calling SSH from Netbackup bpstart_notify

Calling a script at the beginning of a backup job is a fairly common task.
The convention for this when using Symantec (Veritas) Netbackup is to place your commands in a script called 'bpstart_notify', chmodding it to 555 and placing it in /usr/openv/netbackup/bin. If your script can complete in under (the default) 300 seconds you should be home-free.

That is unless your script calls anything on another computer over ssh.

For some reason rsh style commands hang when called from bpstart_notify. For example, "ssh remoteserver remotecommand" will execute on the remote machine, but from netbackup's perspective this will never return. Your backup will eventually time out and its job will fail.

The trick that works is to call a sub-shell from bpstart_notify and return it's value.

MYVAL=`ssh remoteserver remotecommand`
return ${MYVAL}