Pre-processes and post-processes are custom scripts that run automatically before or after backup operations. For databases, pre-restore and post-restore scripts can also run before or after restore operations.
When to use
Use this capability when an application or environment needs an action tied to a backup or restore, such as preparing its state before protection or performing a follow-up action after the operation. Examples include flushing databases before backup, validating prerequisites before restore, locking application files during protection, and performing post-operation cleanup or verification.
Supported
Pre-process and post-process scripts are supported for the following:
| Workload type | Supported workloads | Backups | Restores | Replication |
|---|---|---|---|---|
| File servers |
|
Pre-process and post-process | Not supported | Pre-process and post-process |
| Databases |
|
Pre-process and post-process | Pre-restore and post-restore | Not supported |
For databases, configure backup pre-process and post-process scripts at the subclient level. Configure pre-restore and post-restore scripts separately for each restore job.
Not supported
Pre-process and post-process scripts are not supported for other workload types such as virtual machines (Hyper-V, VMware), Kubernetes, or non-database applications.
Security requirement: Script allowlisting
Scripts stored outside the Commvault installation folder must be allowlisted or run under target machine credentials. By default, newly installed clients block executables from running outside the installation folder when called from machines with Commvault administrative packages (CommServer, WebServer, WorkflowEngine, or AppMgrlite).
For detailed configuration steps, see Allowlisting configuration options for pre- and post-process scripts.