Below is the complete description of the pre and post backup script.
The same is available in the man pages which can be accessed from Contorl-Center->Help->General Help->Man pages at the bottom for windows installtion.
For linux the same can be accessed at the below location as follows.
man -M /opt/NTAPdfm/man dfpm and seach for the below string.
PRE- AND POST-PROCESSING SCRIPTS FOR DATA TRANSFERS
Users can install a pre- and post-processing script for data transfers. This script will be called before and after the data transfers.
The script should return 0 on success and 1-255 on error. An exit code of greater than 255 is not supported by the DataFabric Manager server. If a script returns a
non-zero exit code, no data transfer for the dataset will occur. A log entry will be added to the job indicating that the script invocation has failed. If for any
reason the data transfer fails after the first script invocation, the script is called as soon as the failure (or abort) occurs.
The script can be installed using the "dfpm policy node set policy-name-or-id node-name backupScriptPath=backup-script-path" command. The user as which the script
should be invoked can be set using the "dfpm policy node set policy-name-or-id node-name backupScriptRunAs=backup-script-run-as" command.
Parameters and status codes are passed to the script as environment variables. The names for these strings begin with DP_; e.g. DP_DATASET_ID
The following perl script fragment prints all of the environment variables passed to the script.
foreach $key (sort(keys %ENV))
{
if ($key =~ /^DP_/) {
print "$key: $ENV{$key}\n";
}
}
For backup connections (snapvault and QSM), an installed pre- and post-processing script will be called upto four times during the course of the backup.
It is called once right before taking snapshots on the primaries. It is called again before starting data transfer for backup relationships. It is called third time
after data transfer is completed. It is called fourth time after the job has registered a backup in the Protection Manager.
The script can tell if it is the first or the second etc. invocation by examining the "DP_BACKUP_STATUS" environment variable.
(See the Environment Variables section for details).
The time when script should quiesce application using primary data depends on on whether the snapshot capability is available on the primary host.
On storage systems where snapshot is available, the script should quiesce application when it is invoked before taking primary snapshots. It can resume normal activi-
ties of application when it is invoked for the second time i.e. before transferring data.
On Open Systems agents where snapshot capability is not available, the script should quiece application when it is invoked for the second time i.e. before transfer-
ring data. It should resume normal operation of application when it is invoked for the third time i.e. after transferring data.
For mirror connections (VSM), an installed pre- and post-processing script will be called twice, once before the mirror transfer and once after the mirror transfer. On
first invocation, the script should quiece the application and when it is invoked for the second time, it can resume the normal activities of the application.
For local snapshot creation, an installed pre- and post-processing script will be called twice, once before the creating the snapshot and once after creating the snap-
shot. On first invocation, the script should quiece the application and when it is invoked for the second time, it can resume the normal activities of the application.
The following environment variables are passed into the scripts:
DP_JOB_ID
The data protection job ID.
DP_DATASET_ID
ID of dataset that is being backed up.
DP_DATASET_NAME
Name of dataset that is being backed up.
DP_POLICY_ID
ID of policy associated with the dataset that is being backed up.
DP_POLICY_NAME
Name of policy associated with the dataset that is being backed up.
DP_CONNECTION_ID
ID of policy connection associated with backup job. This environment variable is not defined for local snapshot creation.
DP_FROM_NODE_NAME
Name of policy node from which data is to be transferred. This environment variable is not defined for local snapshot creation.
DP_TO_NODE_NAME
Name of policy node to which data is to be transferred. This environment variable is not defined for local snapshot creation.
DP_BACKUP_STATUS
State of the data transfer. Valid values for backup connection are:
* DP_BEFORE_PRIMARY_SNAPSHOTS
* DP_BEFORE_TRANSFERS
* DP_AFTER_TRANSFERS
* DP_AFTER_BACKUP_REGISTRATION
Valid values for a mirror connection are:
* DP_BEFORE_MIRROR_TRANSFERS
* DP_AFTER_MIRROR_TRANSFERS
Valid values for a local snapshot creation are:
* DP_BEFORE_SNAPSHOTS
* DP_AFTER_SNAPSHOTS
DP_BACKUP_RESULT
Result of the backup. Valid values are:
* DP_SUCCEEDED
* DP_FAILED
* DP_ABORTED
The result is undefined when the script is invoked before data transfers.
DP_RETENTION_TYPE
Type of retention used for backup. It is also defined in mirror connections but is only intended for pre/post backup scripts.
Valid values are:
* DP_HOURLY
* DP_DAILY
* DP_WEEKLY
* DP_MONTHLY
* DP_UNLIMITED
DP_SERIAL_NUMBER
Serial number of the DataFabric Manager installation.
Regards
adai