beautypg.com

HP B6960-90078 User Manual

Page 291

background image

Backup

Pre- and Post-Exec Commands

Chapter 5

261

Environment
Variables

The following environment variables are exported, and can be used in
the

pre-

and

post-exec

scripts for an object on the system where the

Disk Agent is running:

BDACC

The Disk Agent sets its exit code (0 is successful) to the BDACC
environment variable. This variable can be checked in the

post-exec

script, thus making the

post-exec

command dependent on the

successful termination of the Disk Agent.

NOTE

If you perform a host backup, the

pre-exec

script is started once, before

the first filesystem backup for the particular system, while the

post-exec

script is started after the backup. In this case, BDCACC

cannot be exported because the variable is related to a single filesystem
object, not to a whole client.

Key Points

Check the following key points before configuring the

pre-

and

post-exec

commands:

✓ The

pre-

and

post-exec

commands for an object are executed during

the preview of a backup. Therefore, you may want to preview your
backup first and then add the

pre-

and

post-exec

commands, or

check the PREVIEW environment variable in your scripts.

✓ If a

pre-exec

command for an object fails (returns a non-zero value),

the backup status of the object is set to

Aborted

and the Disk Agent

stops processing. No backup of the object exists.

✓ If a

post-exec

command fails (returns a non-zero value), the backup

status of the object is set to

Aborted

. A backup of the object exists and

data can be restored.

✓ The

pre-

and

post-exec

commands should send some output to the

Disk Agent at least every 120 minutes by default, or the backup of the
object is aborted. This time period can be changed by modifying the

SmDaIdleTimeout

variable in the global options file.

Pre-

and

post-exec

commands are handled in the same way as

commands entered at the shell prompt. Special shell characters, such
as the pipe (

|)

and the redirect symbols (

>

,

<

) are not allowed.

✓ While the

pre-

and

post-exec

commands are running, the backup

session cannot be aborted.