Backup Job Scripts
You can instruct Veeam Agent for Linux to run custom scripts within the backup job session:
- 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 configure email notifications about jobs performed by Veeam Agent.
- Pre-freeze and post-thaw scripts (in the Server edition only) — Veeam Agent runs these scripts before and after creating a snapshot. For example, the pre-freeze script may quiesce the file system and application data to bring the Linux OS to a consistent state before Veeam Agent creates a snapshot. After the snapshot is created, the post-thaw script may bring the file system and applications to their initial state.
Consider the following about using backup job scripts:
- Scripts must be created beforehand. You must specify paths to them in the job settings. Veeam Agent supports scripts in the SH file format.
- Scripts must have UNIX line endings (LF).
- Script settings are enabled at the job level. If Veeam Agent operates in the Server edition and you want to configure multiple backup jobs, you can specify individual scripts for each job.
- If you use relative paths in your scripts, during script execution such paths will refer to the root directory. For example, the script may have an output that must be saved to a new file. If you specify a relative path to that file or only a file name, the file will be created in the root directory. To specify a different location for a file, use a full absolute path.
The script is considered to be executed successfully if a "0" is returned.
Pre-Freeze and Post-Thaw Scripts
NOTE |
Veeam Agent does not execute pre-freeze and post-freeze scripts if during the backup job a snapshot is not created. |
The script is considered to be executed successfully if a "0" is returned.
NOTE |
You can specify pre-freeze and post-thaw scripts only if Veeam Agent for Linux operates in the Server edition. If these scripts were enabled for the job while Veeam Agent operated in the Server edition, and then Veeam Agent has switched to another edition (for example, to the Free edition after the license has expired), the backup job will fail. You will need to delete the existing job and create a new backup job without pre-freeze and post-thaw scripts enabled. |