Pre/Post scripts let you run your own business logic at specific stages of a running job. You can specify when to run your scripts in Pre/Post Script Settings of the Backup Wizard and the Restore Wizard in the UI. The scripts can be run on the Backup Server depending on your setting.
Managing the pre/post script is a two part process, consisting of creating the pre/post script and placing the script in the prepost folder.
Create Pre/Post Scripts
Follow these steps:
Pre/Post Script Environment Variables
To create your script, use the following environment variables:
Identifies the name of the job.
Identifies the job ID. Job ID is a number provided to the job when you run the job. If you run the same job again, you get a new job number.
Identifies the node that is being backed up or restored.
Identifies the type of the running job. The following values identify the D2D_JOBTYPE variable:
Identifies the job as a full backup.
Identifies the job as an incremental backup.
Identifies the job as a verify backup.
Identifies the job as a bare-metal recovery (BMR). This is a restore job.
Identifies the job as a file-level restore. This is a restore job.
Identifies the location where the recovery points are stored.
Identifies a temp file. The content of the first line of the temp file is displayed in the activity log.
Identifies the stage of the job. The following values identify the D2D_JOBSTAGE variable:
Identifies the script that runs on the Backup Server before the job starts.
Identifies the script that runs on the Backup Server after the job completes.
Identifies the script that runs on the target machine before the job starts.
Identifies the script that runs on the target machine after the job completes.
Identifies the script that runs on the target machine before capturing the snapshot.
Identifies the script that runs on the target machine after capturing the snapshot.
Identifies the volume that is backed up during a backup job. This variable is applicable for pre/post snapshot scripts for a backup job.
Identifies the result for a post job script. The following values identify the D2D_JOBRESULT variable:
Identifies the result as successful.
Identifies the result as unsuccessful.
Identifies the folder where Backup Server is installed. This variable is applicable for the scripts that run on the Backup Server.
The script is created.
Note: For all scripts, a return value of zero indicates success and a nonzero return value indicates failure.
Place the Script in the Prepost Folder and Verify
All the pre/post scripts for a Backup Server are centrally managed from the prepost folder at the following location:
/opt/Arcserve/d2dserver/usr/prepost
Follow these steps:
/opt/Arcserve/d2dserver/usr/prepost
The script is executed.
The pre/post scripts are successfully created and placed in the prepost folder.
Copyright © 2015 Arcserve.
All rights reserved.
|
|