Step 1. Preparing Custom Script
First of all, you must create a script that will create PD snapshots and/or perform pre-freeze and post-thaw operations.
You can use the sample custom script as an example. To find the sample script, go to the /opt/VeeamBackupAgent/CustomScripts/BackupJobs directory in the AHV Backup Proxy VM.
The custom script content is not considered to be a part of the Veeam product line. Troubleshooting of custom scripts is not supported as per Veeam Support Policy.
Mind the following:
- The sample script is written in Python3, but you can use any language. The used interpreter is specified on the shebang line.
- The sample script contains implemented classes and methods that are used to create a PD snapshot.
- You can find the correct use examples of classes and methods in the body of the main method.
- The sample script contains not implemented methods that you can implement yourself:
- freezeVms(self, pdVmsList)
- unFreezeVms(self, pdVms)
- The sample script does not check validity of the Nutanix AHV cluster certificate.
- With the custom script, you cannot specify parameters required for connecting to Nutanix AHV cluster. These parameters must be stored separately. For details, see Defining AHV Cluster Administrator Credentials.
- If you add the custom script to a backup or PD snapshot job, PD snapshots will be created even for PDs that do not have any Consistency Groups that contain 2 or more entities.
If you don’t add the custom script to a backup or PD snapshot job, PD snapshots will be created only if the PD has at least one Consistency Group that contains 2 or more entities (for example, 2 VMs or one VM and one Volume Group).
Custom scripts support the following arguments:
The name of the protection domain for which you want to create a snapshot.
The name of the backup job for which the script is prepared. This argument is used to create backup job logs in the right directory.
A level of logging.