> For the complete documentation index, see [llms.txt](https://docs.duplocloud.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.duplocloud.com/docs/automation-platform/kubernetes-overview/configs-and-secrets/backing-up-and-restoring-kubernetes-secrets-and-configmaps.md).

# Backing Up and Restoring Kubernetes Secrets and ConfigMaps

DuploCloud provides automated infrastructure-level backups of Kubernetes Secrets and ConfigMaps across all tenants. These backups support disaster recovery, helping ensure that critical configuration and secret data can be restored if a tenant or infrastructure is lost. They also protect against accidental deletion or modification and support manual restoration when needed. All backups are securely stored in AWS S3.

{% hint style="info" %}
Backup support for Kubernetes Secrets and ConfigMaps is currently available only for **AWS**.
{% endhint %}

## Configuring Backups

Backups are configured via an infrastructure setting in the DuploCloud Portal:

1. Navigate to **Administrator** -> **Infrastructure**.
2. Select the Infrastructure you want to back up Secrets and ConfigMaps for in the **NAME** column.
3. Select the **Settings** tab.
4. Click **Add**. The **Infra - Set Custom Data** pane displays.<br>

   <div align="left"><figure><img src="/files/fpt7hVKFEWwcaKk38OIt" alt=""><figcaption><p><strong>Infra - Set Custom Data</strong> pane</p></figcaption></figure></div>
5. In the **Setting Name** list box, select **Other**.
6. In the **Custom Setting** field, enter:

   ```json
   ResourceBackupConfig
   ```
7. In the **Setting Value** field, enter:

```json
{ 
  "IsEnabled": true, 
  "IntervalInHours": "1", 
  "K8sResourceKinds": ["Secret", "ConfigMap"] 
}
```

8. Click **Set** to save the infrastructure setting.

{% hint style="info" %}
**Note**: The backup interval must be at least 1 hour. The `IntervalInHours` parameter accepts values in whole hours only; decimals are not permitted.
{% endhint %}

## Accessing Backups

Backups are saved automatically at the configured interval in the following S3 bucket and path structure:

```
s3://backups-duplo-xx/YEAR/MONTH/DATE/xx/infra/INFRANAME/k8s/namespaces/TENANTNAMES/
```

Backups run automatically, reflect resource changes or deletions, persist even if tenants or infrastructure are deleted, and support multiple AWS regions. Backup operations are tracked in logs and AWS CloudTrail.

{% hint style="info" %}
To restore Kubernetes Secrets or ConfigMaps from a backup, contact DuploCloud Support.
{% endhint %}


---

# 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://docs.duplocloud.com/docs/automation-platform/kubernetes-overview/configs-and-secrets/backing-up-and-restoring-kubernetes-secrets-and-configmaps.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.
