Hello,
where can I find all hook events? I can't find a list in the documentation.
Greetings Florian
where can I find all hook events? I can't find a list in the documentation.
Greetings Florian
Currently, there are only backup related hooks. For those checkwhere can I find all hook events? I can't find a list in the documentation.
/usr/share/pve-docs/examples/guest-example-hookscript.pl
on any Proxmox VE installation.Excellent! I'm glad there are variables for this that the cluster can interpret. With the scripting complexities mostly tackled, now we just need to solve the task hookscript.There is a "HOSTNAME" environment variable that you can read to find out of which node gets backed up. And an argument that contains the the VMID of the VM/LXC as well as "STOREID" environment variable which contains the StorageID of the target backup storage.
So yes, you can do action specific to a node or VM.
Is there any way to set script parameter for backup job in GUI? Or I need to edit conf file under /etc/pve?there are hookpoints specific to vzdump, see the example script in /usr/share/doc/pve-manager/examples/vzdump-hook-script.pl . it's only called for backup tasks where 'script' is set to the path of the executable you want to run at the various points. that parameter is not settable for unprivileged users, just for root@pam (since it allows executing arbitrary code).
Thank you for the clarification. When I see you mentioned "root@pam", I thought the settings is in the UI if I login as root@pam.you can set one for all jobs and tasks in /etc/vzdump.cfg , or for single jobs in /etc/pve/jobs.cfg . not on the UI and intentionally root only.