# Restoring Backups & Snapshots

Similar to the backup and snapshot workflow, Trilio provides intuitive restore workflows that reduce the complexity dramatically for recovering and migrating applications for a Kubernetes based environment.

### Initiating Restores

1. Backups can be restored by name if within the same cluster or namespace scope of T4K
   1. Restore from Backup and Snapshot via the RestorePoints Tab
   2. Restore from Namespace and Backup plan sections
   3. Restore from Backup Overview Page
2. Backups can be restored by location if restoring from a target repository.
   1. Restore from [Cross-Cluster Restores page](https://docs.trilio.io/kubernetes/getting-started/using-trilio/getting-started-with-management-console/index/restoring-backups/cross-cluster-restores)

### Initiate Restore from Namespace section

User can initiate the Restore from Namespace section if the Namespace has Available Backup or Snapshot\
User can initiate the Restore by selecting the namespace by checkbox and click on **Create Restore** option or Restore option from Action items

<div><figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/i6QF0BAgYm3ZXAqyTF2k/ns%20action%20restore.jpeg" alt="Create Backup options"><figcaption><p>Initiate by selecting namespace</p></figcaption></figure> <figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/exnI49aPYB8fAtlsCpG3/ns%20action%20restore%20(1).jpeg" alt=""><figcaption><p>Initiate from action item</p></figcaption></figure></div>

To create a cluster scoped Restore, user can select multiple namespaces for which the Backup or Snapshot is available.

<figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/9x6EwIqMSSCvL9Pkcyx5/mns%20restore.jpeg" alt="Create Backup options"><figcaption><p>Initiate by selecting namespaces</p></figcaption></figure>

If user has select the namespaces from which some namespace are not part of any Backup & Snapshot, user can not initiate a Restore for this, there a message is visible on over the button

<figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/SQ56ha6uFXnRQfzNgekN/restore%20validation.jpeg" alt=""><figcaption></figcaption></figure>

### Initiate Restore from Backup plan section

To initiate the Restore there must be a Backup or a Snapshot should be in available state.\
User can initiate the Restore by selecting the Backup plan by checkbox and click on **Create Restore** option or Restore option from Action items.

<div><figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/pP25UASJtHvv0OHSItXv/bplan%20restore.jpeg" alt="Create Backup options"><figcaption><p>Initiate from action item</p></figcaption></figure> <figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/KYTdBFAT3UqqMFxlhmgR/bpla%20create%20restoe.jpeg" alt=""><figcaption><p>Initiate by selecting backup plan</p></figcaption></figure></div>

### Initiate Restore from Monitoring section

User redirect to the Monitoring model pop-up by clicking on View Backup & Restore summary from action item from Namespace and Backup plan section. From here user can initiate a Restore for specific Backup or Snapshot.

<div><figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/qFRSFFrABKhjGeoQfWZl/restore%20backup.jpeg" alt="Create Backup options"><figcaption><p>Create Backup Restore</p></figcaption></figure> <figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/YPXdn3SUHPA3V8395aTv/restore%20snap.jpeg" alt=""><figcaption><p>Create Snapshot Restore</p></figcaption></figure></div>

#### Restoring Encrypted Backup on the same K8s cluster

While creating [Encrypted Backups](https://docs.trilio.io/kubernetes/getting-started/using-trilio/getting-started-with-management-console/index/creating-backups#encrypting-backups), user need to configure the [Master Encryption Key](https://docs.trilio.io/kubernetes/getting-started/using-trilio/post-install-configuration) first then create the secret with Encryption key. Similarly, while restoring the encrypted backups, user need to create the secret with Encryption key.\
Restoring the Encrypted Backup on same cluster needs Target Browsing enabled. On the restore form, user will get the option to enable the target browsing. Once the target browser is up, user can select the Encryption Secret from the list. After selecting, it will get verified and then user can continue with the restore.

<figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/u8ooUUmZyx33DXXJO6ky/Screenshot%202024-06-05%20at%203.02.17%E2%80%AFPM%20(1).png" alt=""><figcaption><p>Restore Encrypted Backup</p></figcaption></figure>

#### Restoring Encrypted Backup on the different K8s cluster

User need to configure the [Master Encryption key](https://docs.trilio.io/kubernetes/getting-started/using-trilio/post-install-configuration) on the cluster where restore operation will be running. After enabling target browsing, user need to select the backup to restore and create the secret with same Encryption Key(which was used at the time of Backup). Refer following video.

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/9sDjF5HJP1bf8TtLcgkk/blobs/IuapuQO9AdlHLdeGtHPp/EncryptedSecretForRestore%20(2).gif" alt="" width="563"><figcaption><p>Restore Encrypted backup on different cluster</p></figcaption></figure></div>

### Restore flags Configuration

When creating a restore, you can configure various restore flags to customize how the restore operation behaves. For detailed information about all available restore flags, see the [Restore Flags Guide](https://docs.trilio.io/kubernetes/getting-started/using-trilio/getting-started-with-management-console/index/restoring-backups/restore-flags-guide).
