Prescripts and postscripts
You can use custom prescripts and postscripts as part of your data protection operations. These scripts enable automation either before your data protection job or after. For example, you might include a script that automatically notifies you of data protection job failures or warnings. Before you set up your prescripts and postscripts, you should understand some of the requirements for creating these scripts.
Supported script types
The following types of scripts are supported for Windows:
The following types of scripts are supported for UNIX:
Along with default bash shell other shells like sh-shell, k-shell, and c-shell are also supported.
All prescripts and postscripts that are run as part of SnapCenter operations, on nonvirtualized and on virtualized storage systems, are executed on the plug-in host.
The Windows scripts should be located on the plug-in host.
|The prescripts or postscripts path should not include drives or shares. The path should be relative to the SCRIPTS_PATH.|
The UNIX scripts should be located on the plug-in host.
|The script path is validated at the time of execution.|
Where to specify scripts
Scripts are specified in backup policies. When a backup job is started, the policy automatically associates the script with the resources being backed up. When you create a backup policy, you can specify the prescript and postscript arguments.
|You cannot specify multiple scripts.|
The timeout is set to 60 seconds, by default. You can modify the timeout value.
The default directory for the Windows prescripts and postscripts output files is Windows\System32.
There is no default location for the UNIX prescripts and postscripts. You can redirect the output file to any preferred location.