> For the complete documentation index, see [llms.txt](https://docs.trilio.io/kubernetes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trilio.io/kubernetes/user-guide/getting-started-with-management-console/navigating-intro/backup-and-recovery/hooks/create-hook.md).

# Create Hook

## Create a Hook

Open the **Hooks** page from **Backup & Recovery**.

Click **Create New** in the top-right corner.

<figure><img src="https://3731585833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCxOCsdXirQpfhMwv5VA%2Fuploads%2Fgit-blob-ebeff98b5209332fe9ea8ec4c9afd435b7d7bc2d%2Fcreate%20ne%20w%20hook%20(1).jpeg?alt=media" alt=""><figcaption></figcaption></figure>

The **Create Hook** dialog opens.

<figure><img src="https://3731585833-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpCxOCsdXirQpfhMwv5VA%2Fuploads%2Fgit-blob-ae9bb8fa60df69d0ad2f435214f6f4ad87d8e18f%2Fcreate-hook%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

### Fields

1. **Namespace**: Select the namespace where the hook will be created.
2. **Name**: Enter a name for the hook.
3. **PRE**: Commands that run **before** a backup or snapshot.
   * This section is optional.
   * If you fill in any field, all **PRE** fields become required.
   * To clear the **PRE** fields, click **Clear**.
   * **Ignore failure**: If enabled, T4K ignores failures for pre-hook execution.
   * **Timeout (sec)**: Mark the hook as failed if it does not complete in time.
   * **Max retry count**: Maximum retry attempts for the command.
   * **Command**: Command to run. Include the shell and args (for example, `bash -c "<command>"`).
4. **POST**: Commands that run **after** a backup or snapshot.
   * If you fill in any field, all **POST** fields become required.
   * To clear the **POST** fields, click **Clear**.
   * **Ignore failure**: If enabled, T4K ignores failures for post-hook execution.
   * **Timeout (sec)**: Mark the hook as failed if it does not complete in time.
   * **Max retry count**: Maximum retry attempts for the command.
   * **Command**: Command to run. Include the shell and args (for example, `bash -c "<command>"`).
5. **Create**: Create the hook.
6. **Cancel**: Close the dialog without saving.

{% hint style="info" %}
Hooks without a **PRE** section cannot be selected for Backup Plan or Snapshot workflows.
{% endhint %}
