Running pre and post commands for restore jobs

You can run commands before or after a restore job, and set the following conditions for these commands:

  • Run the job only if the pre-job command is successful

  • Run the post-job command only if the pre-job command is successful

  • Run the post-job command even if the job fails

  • Allow Backup Exec to check the return codes (or exit codes) of the pre- and post-job commands to determine if the commands completed successfully. An exit code of zero returned to the operating system by the pre- or post-job command is interpreted by Backup Exec to mean the command completed successfully. A non-zero exit code is interpreted by Backup Exec to mean the command ended with an error.

See About pre/post commands.

See Setting default pre/post commands.

See Restoring data by setting job properties.

To set up commands to run before or after a restore job

  1. In the Properties pane, under Settings, click Pre/Post Commands.

  2. Complete the options as needed.

    See Pre/post commands for backup or restore jobs.

Running pre and post commands for restore jobs