Pre-/Post-hooks also executed for pure resource backups #3474
-
Hi guys, just want to have a confirmation and maybe a reasoning: Seems that Velero will always invoke hooks on Pods when annotations are present even for pure resource backups when no PVC snapshots are in play (--use-volume-snapshots=false). Can anybody please confirm and maybe explain why the hooks are still considered to be beneficial in this scenario? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@henkypunky Yes, per and post hooks are executed on pods whenever a pod is being backed up. |
Beta Was this translation helpful? Give feedback.
-
Here is the code to confirm that the hooks are run during pod backup, regardless of whether or not volume snapshotting is enabled. |
Beta Was this translation helpful? Give feedback.
@henkypunky Yes, per and post hooks are executed on pods whenever a pod is being backed up.
One explanation for why we might want to do that is, the hooks don't have to be restricted to performing operations to snapshot persistent volumes. They can be used, for example, to communicate with the application that it is being backed up, and when the backup process has completed. So it would be useful to run pre and post hooks even when volume snapshots are disabled.