Application hooks allow you to make sure that stateful applications like databases are in the proper state to be backed up by executing pre-backup and post-backup commands in specified containers on your cluster. You can also define post-restore commands for the flip side of the process. Once defined, App Hooks can be referenced from backup or restore definitions.
Add a new App Hook so that you can run shell commands on your Kubernetes cluster system.
From the menu bar, open Configuration > App Hooks
Click Add App Hook + to open the Add App Hook pane.
Enter the following fields:
Enter a name of the App Hook.
Select one of the followings:
Pre-backup – Commands to be executed before a backup job is run.
Post-backup - Commands to be executed before after a backup job is run.
Post-restore - Commands to be executed before after a backup restore job is run.
Common – Can be used for two or more of Pre-backup, Post-backup, or Post-restore. Will be displayed under all categories.
- App Selector
Enter the key-value pairs of the Kubernetes pod.
Shell commands to run on the application container.
You can add multiple containers and commands to an app by clicking the plus (+) icon, and you can add multiple apps by clicking + Add app. Click Save to create the App Hook.
After creating AddHooks, define a backup for a cluster, and you can enable and select AddHooks for the cluster backup.
For more information about defining a cluster backup, follow the instructions in Creating a backup job for cluster.
To edit an App Hook in the list, click Edit for the item. To delete the App Hook, click Remove.