HP (Hewlett-Packard) B6960-90078 Computer Drive User Manual


 
Backup
Pre- and Post-Exec Commands
Chapter 5 259
Key Points Check the following before configuring pre- and post- exec commands
for a backup specification on a local or remote host:
If a pre-exec command fails (returns a non-zero value), the backup
status of the session is set to failed and the session is aborted.
If a post-exec command fails (returns a non-zero value), the backup
of the session is set to completed with errors.
The pre- and post-exec commands for a backup specification are by
default NOT executed during a preview of a backup. This behavior is
defined by the ExecScriptOnPreview variable in the global options
file. See “Global Options File” on page 523 for details.
While the pre- or post-exec commands are running, the backup
session cannot be aborted.
The pre- and post-exec processes operate in the background mode.
Therefore, do not use any interactive commands for pre- and post-
exec processing.
The pre- and post-exec scripts have to send some output at least
every 15 minutes by default, or the sessions waiting for the scripts
are aborted. You can change this time interval by modifying the
ScriptOutputTimeout variable in the global options file.
Time-out is provided. If no message is received within the specified
time-out in seconds, the session is aborted.
If there is no executable script on the host or if the path of the script
is wrong, Data Protector displays an error message that the script
failed and the session is aborted.
If a command writes any text to stdout, this text is sent to the
Session Manager and written to the database. A stderr is redirected
to /dev/null. You can redirect it to stdout to get error messages
logged to the database.
NOTE A pre- or post-exec script may hang because it did not close all file
descriptors before forking a new process. If the new process runs in the
background and does not exit, such as, for example, the database server
process (dbstart), the scripts hang. You can use the detach command.
The source of the detach command is provided in the detach.c file, but
is officially unsupported. For example: