Backup Job and Snapshot Scripts

You can instruct Veeam Agent to run custom scripts within the backup job session. Veeam Agent for Microsoft Windows supports the following types of scripts:

Considerations and Limitations

If you use Veeam Backup & Replication on Linux, you must place the scripts into the /var/lib/veeam/scripts/ directory on the backup server.

If you use Veeam Backup & Replication on Windows, you can place the script files in any local folder on the backup server.

Pre-Freeze and Post-Thaw Scripts

Veeam Agent runs these scripts before and after creating a snapshot of the backed-up volume. For example, the pre-freeze script may quiesce the file system and application data to bring the OS to a consistent state before Veeam Agent creates a snapshot. After the snapshot is created, the post-thaw script brings the file system and applications to their initial state.

You can specify pre-freeze and post-thaw script settings at the Guest Processing step of a backup job wizard. To learn more, see sections Pre-Freeze and Post-Thaw Scripts (for backup jobs managed by the backup server) and Pre-Freeze and Post-Thaw Scripts (for backup policies).

During the backup job session, Veeam Backup & Replication uploads the scripts to each Veeam Agent computer added to the backup job and executes them on these computers. The scripts run in the same way as in the standalone version of Veeam Agent. To learn more, see the Backup Job Scripts section in the Veeam Agent for Microsoft Windows User Guide.

Pre-Job and Post-Job Scripts

Veeam Agent runs these scripts before the backup job starts and after the backup job completes. You can use pre-job and post-job scripts, for example, to throttle activities of some resource-consuming services on the backup server during the backup process.

You can specify backup job script settings at the Storage step of the backup job wizard. To learn more, see Script Settings.

During the backup job session, Veeam Backup & Replication executes the scripts on the backup server under the account under which the Veeam Backup Service runs (the local System account or account that has the local Administrator permissions on the backup server).

Script Execution Order

If you specify both pre-job and post-job and pre-freeze and post-thaw scripts, the scripts will be executed in the following order:

  1. Pre-job script
  2. Pre-freeze script
  3. Post-thaw script
  4. Post-job script

Page updated 11/21/2025

Page content applies to build 13.0.1.180