Problem
How to implement a pre or post command when running a VMware backup job
Solution
When running a VMware backup, the traditional way of using the pre/post command functionality within Backup Exec is not possible.
If it is required to run a pre/post command for a VMware backup the following steps are required:
1. Make sure of VMware tools is installed.
2. Put the custom script(s) in the following folder
Windows VMs | C:\Program Files\VMware\VMware Tools\backupScripts.d |
Linux VMs | /etc/vmware-tools/backupScripts.d |
When the VMware snapshot request is made, the VMware tools will call these files.
Pre-freeze:
All the scripts at the folder are invoked in alphabetical order with freeze as the first argument.
Post-thaw:
All the scripts at the folder are invoked in descending alphabetical order with thaw or freezeFail as the first argument.
Script name:
Because Backup Exec Remote Agent puts 'freeze.bat' on Windows VMs, we recommend the custom script name starts with a-e.
External reference:
Running custom quiescing scripts inside Windows virtual machine with ESX 3.5 Update 2 and later (1006671)
https://kb.vmware.com/s/article/1006671
Note: Since VMware often changes the way or path of the pre/post scripts, VMware Technical Support should be contacted for guidance for the current version.