Backup
Pre- and Post-Exec Commands
Chapter 5 255
Pre- and Post-Exec Commands for a Specific Backup Object
Pre- and post-exec commands for an object are executed before and
after the backup of the object, respectively. You can specify these
commands for all objects in a backup specification, or for each individual
object. When backing up integrations, for example Oracle, the database
is considered as an object, so the commands are executed before and after
the database backup. These commands are executed on the system
where the Disk Agent is running.
Where to Locate
the Commands
Pre- and post-exec scripts for a backup object are started under the
Data Protector Inet Service account (by default, Local System account)
and can be located in any directory, except for host backup object. For
host backups they must reside in the <Data_Protector_home>\bin
directory on the system where the Disk Agent is running. For scripts
located in the <Data_Protector_home>\bin directory you specify only
the filename, otherwise a full path name of the script must be specified.
How to Specify the
Filename or
Pathname
To apply pre- and post-exec commands to all objects in the backup
specification, click the Options tab in the backup specification. Under
Filesystem Options (Disk Image Options in a saved backup
specification for disk image backup), click Advanced.
To apply pre- and post-exec commands to individual objects only, click
the Backup Object Summary tab in the backup specification. Right-click
an object and click Properties. In the Object Properties dialog box,
click the Options tab.
To apply pre- and post-exec commands to an integration object, click
the Options tab in the backup specification. Under Application
Specific Options, click Advanced.
Write the filename or pathname in the Pre-exec and/or Post-exec text
box.
When entering a full pathname, if your directory names are longer than
8 characters, write the pathname either in quotes or in the short 8.3
MS-DOS compatible form.
Environment
Variables
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
command, thus making the post-exec command dependent upon
successful termination of the Disk Agent.