Backup

Pre- and Post-Exec Commands

Pre- and Post-Exec Commands

Before a backup or restore session begins, an additional action is sometimes necessary. For example, you may want to check the number of files to back up, stop some transaction processing, or shut down a database. Such actions are performed using pre- and post-execcommands. Pre- and post-execcommands are not supplied by Data Protector. Depending on your needs, you have to write your own executables to perform the required actions.

For backup, pre- and post-execcommands can be configured on two levels:

Backup Specification

The pre-execcommand is executed before the backup session starts. The post-execcommand is executed when the backup session stops. You specify these commands as backup options for the entire backup specification. By default, pre- and post-execcommands for the session are executed on the Cell Manager, but you can choose another system.

Specific Backup Object

The pre-execcommand for a specific backup object starts before the object is backed up. The post-execcommand for the backup object is executed after the object is backed up. You specify these commands as backup options that apply for all objects, or for individual objects. Pre- and post-execcommands for the object are executed on the system where the Disk Agent that backs up the object is running.

Pre- and post-execcommands are run in the following order:

1.The pre-execcommand for the entire backup specification starts and completes.

2.For each object in the backup specification:

a.The pre-execstarts and completes.

b.The object is backed up.

250

Chapter 5

Page 280
Image 280
HP B6960-90078 manual Pre- and Post-Exec Commands, Backup Specification, Specific Backup Object, 250