With the introduction of HPE Data Protector 9.07 further action has been taken in the direction of security. Performing pre- and post-exec scripts might no longer permitted after the upgrade and instead an error is displayed.
[Major] From: BSM@w2012rdp.localdomain "dbbackup" Time: 05.07.2016 11:35:01 Session post-exec script C:\test\startme.cmd failed. Exit code = 2.
Reason: running scripts and binaries is only permitted in the bin directory of the installation (/opt/omni/lbin – HP-UX, Linux oder Solaris; /usr/omni/bin – other UNIX systems or OMNIHOME\bin – Windows). The usage of absolute and relative paths (for example: c:\scripts\test.cmd, /home/scripts/test.sh or ../../../home/scripts/test.sh) outside of bin
is no longer permitted. Likewise, executing Perl is no longer possible and can not be used as a pre- and post-exec script directly (e.g. perl.exe myscript.pl parameter1). However, it is possible to use batch files instead (e.g. startme.cmd parameter1) in which then the actual script is called. Hence the possible values have been adjusted for the corresponding omnirc variable OB2OEXECOFF
– 0 Pre / post-exec scripts will be ran
(with the restriction on the path) and 1 Pre / post-exec scripts disabled
.
With these adjustments, the scripts can then run again.
[Normal] From: BSM@w2012rdp.localdomain "dbbackup" Time: 05.07.2016 11:55:12 The exec script "startme.cmd" has completed.
The same “enhancement” came also with version DP patch bundle 8.16.