An administrator may want to run a script before or after failing over a VPG. Zerto Virtual Replication supports this functionality with the Pre-recovery and Post-recovery script configuration option, in the VPG configuration.
Through 2.0 Update 1 (Viper)
- %ZertoVPGName% – The name of the VPG. If the name includes a space, enclose the variable in double quotes (”). For example, the VPG MyVPG uses the format %ZertoVPGName% but the VPG My VPG uses the format “%ZertoVPGName%”.
- %ZertoOperation% – The operation being run: Failover, Move, Test, MoveBeforeCommit, MoveRollback.
- %ZertoVCenterIP% – The IP address of the vCenter Server where the VPG is recovered.
- %ZertoVCenterPort% – The port used by the Zerto Virtual Manager to communicate with the vCenter Server – the default is 443.
- %ZertoForce% – A boolean value, Yes/No, that dictates whether to abort the operation if the script fails.
- Command to run – The name of the script to run, including the full path. The script must be located on the same machine as the Zerto Virtual Manager for the recovery site.
- Params – The values of any parameters to pass to the script. Separate parameters with a space.
- Timeout (sec) – The time out in seconds for the script to run. If the script runs before executing a failover, move or test failover and the script fails or a timeout value is reached, an alert is generated and the failover, move or test failover is not performed1. If the script runs after executing a failover, move or test failover and the timeout value is reached, an alert is generated. The default value is the value specified in the Site Configuration Advanced Settings dialog.