How to run pre and post commands in Backup Exec.

Article:TECH23446  |  Created: 2009-01-05  |  Updated: 2012-03-29  |  Article URL http://www.symantec.com/docs/TECH23446
Article Type
Technical Solution

Product(s)


Issue



How to run pre and post commands in Backup Exec.


Solution



Running pre and post commands is useful in the following scenario:

To run batch files and executables before or after the backup job.
Antivirus needs to be stopped or started before backup starts.
Some services need to be stopped or started when offline backup needs to be performed.
 
The following commands can be run before or after a backup or restore job, and  for these commands the conditions can be set:
  • Run the backup or restore job only if the pre-command is successful.
  • Run the post-command only if the pre-command is successful.
  • Run the post-command even if the backup or restore job fails.
  • Allow Backup Exec to check the return codes (or exit codes) of the pre- and post-commands to determine if the commands completed successfully.
An exit code of zero returned to the operating system by the pre or post-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.
 
  1. To run pre and post commands, do the following:
  2. Start Backup Exec, and then select Window | Job Setup
  3. Right-click the job to be modified, and select Properties.
  4. The Backup Job Properties window will appear. Select Pre/Post Commands (Figure 1).
 Figure 1:
 
The pre and post job commands can be specified in the Pre-job and Post-job commands section. Type the path and file name of the batch file (or executable) that is required to be run. This should then enable Backup Exec to run the commands before or after the backup job.
 
The path must be set as indicated below:
x:\path\prejob.bat (where x is a local drive letter to the server where the batch file will run).
 
For additional information on the options, click Help.



Legacy ID



253162


Article URL http://www.symantec.com/docs/TECH23446


Terms of use for this information are found in Legal Notices