> 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/5.0.x/getting-started/using-trilio/getting-started-with-management-console/navigating-intro/backup-and-recovery/backupplans/create-backup-plans.md).

# Create Backup Plans

This page explains how a user can create various types of backup plans.

## Create Backup Plans

1. Log in to the T4K **Management Console**.
2. From the left panel menu, click **Backup & Recovery**.
3. Select one of your clusters from the left panel menu, which displays a dropdown menu for you to select from.<br>

   <figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FYikp6F3EMWtO1cNMGouw%2Fcreatebackupplan.png?alt=media&amp;token=8af0d2d4-d6bb-412a-bb9f-8f19a3ff24e3" alt="" width="563"><figcaption><p>Backup Plan Listing</p></figcaption></figure>
4. From this dropdown menu, select **Backup Plans**.
5. From the page displayed, select **Create New**.
6. Choose from the three types of backup plan that may be created:
   * **Application**
   * **Single-namespace**
   * **Multi-namespace**
7. Follow the separate instruction sets for the backup plan types below.

## Backup Plan - Single Namespace

1. The **CREATE NEW BACKUPPLAN Single Namespace** window \*\*\*\* displayed is arranged into two sections. Left section displays the current step. The right section opens to configuration section which is the first step to create a plan.<br>

   <figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FVnhFtPsqOBddatPbGQu3%2Fcreatebackupplanform.png?alt=media&amp;token=c130fa35-78cc-4078-a4ed-c9db964e85bb" alt="" width="563"><figcaption><p>Create Backup Plan Configuration</p></figcaption></figure>
2. **Namespace -** Choose from the dropdown menu.
3. **Name -** Type a meaningful name for your plan.
4. **Target** - (Mandatory) Target is a storage location where backup/ snapshot will be stored. Select a target from the dropdown.
5. **Encryption Secret** - Choose an encryption secret from the dropdown menu. Which will encrypt  backup/snapshot.
6. **Snapshot Policies -** This opens snapshot policies options which schedules the snapshot based on the policy selected.
7. **Snapshot Scheduling Policy -** This dropdown list all the scheduling policies to select from.
8. **Snapshot Retention Policy -** This dropdown list all the retention  policies to select from.

<figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FN0BXAU6hHksXS5f2WFpj%2Fcreatebackupplansnapshotpolicy.png?alt=media&amp;token=e7277f76-75f4-48cd-8170-b2d4b79a3687" alt="" width="563"><figcaption><p>Create Backup Plan Snapshot Policies</p></figcaption></figure>

9. **Backup Policies -** This opens backup policies options.

<figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FZbhpPOA4emyvUQ2oAmnM%2Fbackuppolicy.png?alt=media&amp;token=bce87b99-bf07-40f8-aaf6-8125ca3e8f05" alt="" width="563"><figcaption><p>Create Backup Plan Backup Policies</p></figcaption></figure>

10. **Scheduling Policy** : **Full Backup** this schedules the backup based on the policy selected, when this plan is part of full backup.
11. &#x20;**Scheduling Policy : Incremental Backup** this schedules the backup based on the policy selected, when this plan is part of an incremental backup process.
12. **Retention Policy** A retention policy specifies the number of backups to retain for different intervals.Select a retention Policy from the dropdown.

<figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2Fz1funmGID569PGMSWHnv%2Fbackupplanadvancednew.png?alt=media&amp;token=0fc56c8a-87c6-4934-a45e-1bf8d18b9a93" alt="" width="563"><figcaption><p>Create Backup Plan Advanced Section</p></figcaption></figure>

13. **Retain Helm Apps** - Enable this toggle to retain Helm apps during restore operations for backup.
14. **Skip Image Backup** - This toggle is to skip image Backup as it excludes the backup of container image.
15. **Add Hooks**&#x20;
16. Click **Next**.
17. The **Step 2: Resource Selector** tab is now displayed. To **include resources**, click **Add Resources**. Included resources will appear under the **Included Resources** list.<br>

    <figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FDVmBYtlMrx5dngDjaC7U%2Fbackupplanresourceselector.png?alt=media&amp;token=6b282a78-63ff-4e72-8c32-4a6e8809216c" alt="" width="563"><figcaption><p>Create Backup Plan Resource Selector</p></figcaption></figure>
18. To **exclude resources**, click **Add Resources**. Excluded resources will appear under the **Excluded Resources** list.
19. Click **Next**.\ <br>

    <figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2Fxj5zuUiSXmhVfAyBuOei%2Fcreatebackupplansnsfinalstep.png?alt=media&amp;token=e011b491-63ae-434b-86f5-7dda1a196389" alt="" width="563"><figcaption><p>Create Backup Plan Continuous Restore</p></figcaption></figure>
20. &#x20;**Step 3: Continuous Restore** (Optional) \
    **Remote TVK Instance** Select a remote TVK instance from the dropdown menu&#x20;
21. **Continuous Restore Policy** is a dropdown that list all the Continuous Restore Policies, And also provide an option to create a new  Continuous Restore Policy by clicking new  Continuous Restore Policy link provided at the bottom of the dropdown .
22. **Add new transform** [#create-backup-plan-hook-configuration](#create-backup-plan-hook-configuration "mention")
23. **Skip & Create** if Continuous Restore is not required, click on this to skip the step.
24. Click **Create** to create a backup plan with **Continuous Restore.**
25. **The Step 4: Final Step Status Log**<br>

    <figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2F1m0jaYAyyM9oDKaLwiT0%2Fstatuslogpage.png?alt=media&amp;token=fde364c5-bc86-4866-8650-7fa2eb0fcbab" alt="" width="563"><figcaption><p>Status Log</p></figcaption></figure>

## Backup Plan - Application

1. The first step for **Application Backup Plan** is similar to **Single Namespace Backup Plan.**
2. The **Step 2: Component Details** Step is now displayed. There are three optional sub-tabs to choose from:&#x20;

{% tabs %}
{% tab title="Operator" %}

* Click **Add Operator** Then type your operator name or ID into the **Operator** text field.\
  ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FaUxLsECIwsTeY2J5UVje%2Foperator1st.png?alt=media\&token=b07e23da-023e-4c30-b1c6-58b70fd6f002)
* After clicking **Add Operator** type your operator name or ID into the **Operator** text field, And click on Apply.\
  ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2Fsncr95vxzRAYmX5LVgtl%2Foperator2nd.png?alt=media\&token=9e8764b4-9dd7-439f-942b-edc24b80040c)
* After clicking **Apply** the operator will be added. Here there are multiple actions.<br>
  1. Click **Add Another** to include an operator.
  2. Use the **Edit icon** to modify the new operator.
  3. Click the **X** icon to remove the operator.
  4. Select **Add Operator Resources** to include resources.
  5. Click\
     ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FbqphV1M1f4x5CtFOQggL%2Foperatorfinal.png?alt=media\&token=6b011642-7ce3-4114-b1cf-f4102c67e4e2)
     {% endtab %}

{% tab title="Helm Release" %}

* Click **Add Helm Release**.\
  ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2F2zU7GEPUMGecrTlcOIXF%2Fhelm.png?alt=media\&token=9fc94633-a97c-43f9-bfbf-ee951a383693)
* &#x20;Then **Select a Helm release** from the dropdown.\
  ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FYZ78Fzx6XFqpfHd1o6E3%2F52.png?alt=media\&token=374babf2-9b46-44e6-88c9-06e00df561eb)
* Click **Apply**
  {% endtab %}

{% tab title="Custom" %}

* Click on **Custom** tab.\
  ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2F66LzWCo9zWRgkfER9U5w%2Fcustom.png?alt=media\&token=ff851b93-3ae3-4cbe-b14c-8b7358416a70)
* To **include resources**, click **Add Resources**. Included resources will appear under the **Included Resources** list.
* To **exclude resources**, click **Add Resources**. Excluded resources will appear under the **Excluded Resources** list.
  {% endtab %}
  {% endtabs %}

3. The **Step 3: Continuous Restore Step** is now displayed. This is same as Backup Plan - Single Namespace.
4. **The Step 4: Final Step Status Log** is same as Single Namespace status log.<br>

## Backup Plan - Multi-namespace

The **CREATE MULTI-NAMESPACE BACKUPPLAN** window \*\*\*\* displayed is arranged into two main sections left one shows the steps/progress and right one shows **Global Configuration**. First to display is **Step 1: Global Configuration.**\
\
Provide parameters like:

<div align="left"><figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FblGP4n49kHHHlrF3EiB1%2Fmultinsglobalconfig.png?alt=media&amp;token=129b6fa0-1f9c-4cee-a9d3-280e22f49757" alt="" width="563"><figcaption><p>Create Multi-Namespace Backup Plan </p></figcaption></figure></div>

1. **Target** (Mandatory) Target is a storage location where backup/ snapshot will be stored. Select a target from the dropdown.
2. **Encryption Secret** - (Optional) Choose an encryption secret from the dropdown menu. Which will encrypt  backup/snapshot.
3. Click **Next**.
4. &#x20; **Step 2: Resource Selection**  resources can be added  to the **Included Resources** by clicking **Add Resources.**&#x61;nd/or the **Excluded Resources** list by clicking **Add Resources**. In this example, none are added.\
   ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2F9vhte4RNBePvjAgaQkUg%2Fresource.png?alt=media\&token=dbecc1f3-3bbc-49a0-8d57-2873a54b69d2)
5. Resources can be excluded form the **Excluded Resources** list by clicking **Add Resources**.&#x20;
6. Click **Next**
7. **Step 3: Namespace Configuration  By Namespace** is the first sub-tab of the **Step 3: Namespace Configuration**. On this sub-tab, selected namespace are listed. To add namespace-specific configuration like **hooks**, **exclude resources** and **include resources**, click **Add Configuration** beside the relevant namespace. There is also an option to **Add Namespace** if you wish to do that. This step is optional, so if namespace specific-configurations are not specified, global level configurations will be applied.\
   ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FP6Hrd8NtIaqDp12ZJpgA%2Fnamespaceconfig.png?alt=media\&token=0bd9d06f-d1e9-4f78-8a71-9a803f41b723)
8. &#x20;**Step 3: Namespace Configuration By Namespace Selector** is the second sub-tab of this step. On this sub-tab, you can select **Add Namespace Selector**. This is \*\*\*\* a combination of matching labels and matching expressions and T4K will select the namespaces that match the selected label sets dynamically. This step is optional, so if namespace specific-configurations are not specified, global level configurations will be applied.\
   ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FFDOAJ2e5Ok9oXuC0dmzX%2FresourceSelector.png?alt=media\&token=045d232c-b877-4273-a53b-54c3793d90e0)
9. Click next.
10. **Step 4: Continuous Restore** (optional) this have two dropdowns first  **Remote TVK Instance** which is a dropdown to select the TVK instance. and second **Continuous Restore Policy** dropdown that list all the Continuous Restore Policies. And also provides option to create a new continuous Restore Policy by clicking new continuous Restore Policy link provided at the bottom of the dropdown.

<figure><img src="https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FoKbEZKcYzoV3PrTlKA1A%2Fcont.png?alt=media&amp;token=b124dd27-299f-4fe7-812d-b6d4acb6cad3" alt="" width="375"><figcaption><p>Create Backup Plan Continuous Restore</p></figcaption></figure>

11. **Skip & Create** if Continuous Restore is not required click on this to skip the step.
12. Click **Create** to create a backup plan with **Continuous Restore.**
13. You are now prompted to name your backup plan. Type a meaningful name into the free text field.\
    ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FqlJNglI3KVT7lh1G9ZpB%2Fmnsfinal.png?alt=media\&token=17434ff9-0723-40a6-bf3a-8e2c18fa2960)
14. Select **Done**.
15. **Step 5: Status Log** is same as Single Namespace status log.

## Create Backup Plan - Hook Configuration

This section explains how to add hooks to a backup plan.\
\
In **Create Backup Plan Step 1: Backup Plan Configuration**, click on the **Advanced** section and then click **Add Hook**.\
![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2F9vCFNtxmlp52DtPObcrR%2Fhook.png?alt=media\&token=b3303290-6178-4efe-b3d3-aa4c020a8019)\
1\. **Select a Hook** from the dropdown menu or create a new hook using the link provided at the very bottom of the dropdown. [Create Hook](/kubernetes/5.0.x/getting-started/using-trilio/getting-started-with-management-console/navigating-intro/backup-and-recovery/hooks/create-hook.md)\
\
![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2F5WvyYOQVeDOeIZnVFnIw%2Faddhookfinal.png?alt=media\&token=0289f11f-d936-4bc9-b333-15d9b03a10d1)

\
2\. TVK provides the capability for selecting the containers within the pods selected by the pod selector.

* Click on **Add label Set**  to add a Label Set.&#x20;

* There will be two sub-tabs: **Match Labels** and **Match Expressions**.

  \
  \
  ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FS7n6m0avSSsJP4h0mzyM%2Faddlabel.png?alt=media\&token=458efedb-206a-4562-a2d8-bb92ad233a3c)<br>

* **Match Labels:**

  * Select Labels from the dropdown and click **Apply.**
  * The added labels will be listed under the **Added Labels** section.
  * Click **Add** to add label set to the hook.

* Match Expressions:
  * Match expressions include key-operator-value pairs where the value is optional based on the selected operator.\
    ![](https://2799369373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7fCvY8ASJrGmS0BSdWtM%2Fuploads%2FLaBEGB9FH4j0hbFAKwCr%2Faddlabelset.png?alt=media\&token=402b8538-ef6c-49fd-97dd-85eb1ac933b8)
  * Click on **Match Expression** sub tab.
  * Select a Key from the **Keys** dropdown.
  * Select an operator from **In**, **Not In**, **Exists**, or **Does Not Exist**.
  * Select a value (only if **In** or **Not In** is selected in the previous step).
  * Click **Apply** to add this to **ADDED LABELS** list.
  * Click **ADD**

3\. **Pod Selection Using Regex:**

* The pod selection can be done by matching a regex Or provide a **Regex.**&#x20;

4. **Container Name Matching:**

* The expression provided in this field is used to match container names within the pods selected by the pod selector.
