Skip to main content
SnapCenter Software 5.0
A newer release of this product is available.

Prescripts and postscripts

Contributors

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:

  • Batch files

  • PowerShell scripts

  • Perl scripts

The following types of scripts are supported for UNIX:

  • Perl scripts

  • Python scripts

  • Shell scripts

    Note Along with default bash shell other shells like sh-shell, k-shell, and c-shell are also supported.

Script path

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.

Note 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.

Note 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.

Note You cannot specify multiple scripts.

Script timeouts

The timeout is set to 60 seconds, by default. You can modify the timeout value.

Script output

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.