> For the complete documentation index, see [llms.txt](https://documentation.immuta.com/knowledge-base/LmMmmLqSszWn8sdGe7gH/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.immuta.com/knowledge-base/LmMmmLqSszWn8sdGe7gH/self-managed-articles/ihc-related/restore-and-dr-for-external-databases-in-azure-and-aws-ihc.md).

# Restore & DR for external database’s in Azure & AWS (IHC)

PLEASE NOTE: If on the old external database architecture (Helm Chart <4.13.0) please reach out to Immuta Support prior to making any changes to avoid potential issues.

#### **Azure Scenario 1 - Azure managed restore** *This scenario should be used when performing Azure infrastructure upgrades or other infra. related activities are causing issues with all resources in the Immuta cluster, or there is corruption/ total loss of the flexible PostgreSQL server.*

**If the Immuta installation is up and operational then please skip to step 2**

1. Perform a Helm uninstall of your Immuta installation
   1. Once the Helm uninstall is complete please ensure all PVCs are removed:
      1. ```
         kubectl -n <NAMESPACE> get pvc
         ```
      2. ```
         kubectl -n <NAMESPACE> delete pvc <PVC-NAME>
         ```
2. Within the Azure PostgreSQL page of your database, navigate to the “Backup and Restore” section in the left side navigation panel
   1. Select the latest backup and click on “Fast Restore”
   2. Leave the default values that are auto-populated as these are copied from your existing database; Then chose the latest restore point or select a PIT (point in time) recovery option if available
   3. Name the flexible server instance something that is NOT the same as the already existing server. Then select “Create” at the bottom.
3. Once completed, navigate to the resource page of the newly created PostgreSQL flexible server and copy the host name generated in the upper right side.
   1. Use this value to replace the ***old*** host value under the external database section and save
4. Perform a `Helm install`
   1. If you are only changing the database side and leaving the Immuta installation intact then perform a `Helm upgrade` instead.

#### **Azure Scenario 2 - Immuta cluster restore** *This scenario should be used when performing Azure infrastructure upgrades or other infra. related activities are causing issues with the Immuta installation and NOT the external flexible PostgreSQL server.*

1. Perform a Helm uninstall of your Immuta installation
   1. Once the Helm uninstall is complete please ensure all PVCs are removed:
      1. ```
         kubectl -n <NAMESPACE> get pvc
         ```
      2. ```
         kubectl -n <NAMESPACE> delete pvc <PVC-NAME>
         ```
2. Verify the values file is up to date and current with the proper external database host name
3. Perform your infrastructure changes/ updates in AKS
4. Once complete, perform a `Helm install` to reinstall Immuta and connect to the external database.

#### **AWS Scenario 1 - RDS Snapshot Restore** *This scenario should be used when performing AWS infrastructure upgrades or other infra. related activities are causing issues with all resources in the Immuta cluster, or there is corruption/ total loss of the RDS DB Instance.*

**If the Immuta installation is up and operational then please skip to step 2**

1. Perform a Helm uninstall of your Immuta installation
   1. Once the Helm uninstall is complete please ensure all PVCs are removed:
      1. ```
         kubectl -n <NAMESPACE> get pvc
         ```
      2. ```
         kubectl -n <NAMESPACE> delete pvc <PVC-NAME>
         ```
2. Navigate to your Immuta RDS instance in AWS and select the “Maintenance & Backups” tab
3. Scroll to the bottom where it will list all available snapshots and select the latest snapshot, or a specific PIT (point in time) snapshot that you wish to recover to and click on “Restore”:
   1. Create the database name identifier; This needs to be unique and cannot match the currently running RDS instance
   2. This will copy over the following configurations from the snapshot:
      1. databases
      2. passwords & users
      3. extensions
      4. PostgreSQL version
   3. It does not copy over and must be re-configured:
      1. storage & compute config
      2. database ID name (unique)
      3. VPC, Security Groups, Public Access
4. When you match the configuration to the previous RDS instance, click on “Restore DB Instance”
5. This will then create a new RDS instance with the new configurations set and the snapshot, when that is done being created navigate to the newly created RDS instance
   1. Note down the new instance hostname
   2. Replace the `externalDatabase.host` value in your `immuta-values.yaml` file with this to point your Immuta installation at the newly restored external database.

#### **AWS Scenario 2 - Immuta cluster restore** *This scenario should be used when performing AWS infrastructure upgrades or other infra. related activities are causing issues with the Immuta installation and NOT the external RDS DB Instance.*

1. Perform a Helm uninstall of your Immuta installation
   1. Once the Helm uninstall is complete please ensure all PVCs are removed:
      1. ```
         kubectl -n <NAMESPACE> get pvc
         ```
      2. ```
         kubectl -n <NAMESPACE> delete pvc <PVC-NAME>
         ```
2. Verify the values file is up to date and current with the proper external database host name
3. Perform your infrastructure changes/ updates in AKS
4. Once complete, perform a `Helm install` to reinstall Immuta and connect to the external database.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.immuta.com/knowledge-base/LmMmmLqSszWn8sdGe7gH/self-managed-articles/ihc-related/restore-and-dr-for-external-databases-in-azure-and-aws-ihc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
