---
title: "Backups in an OpenSearch cluster"
sidebar_label: "Backups"
sidebar_position: 10
description: "Backup schedule, backup retention period, and how to restore indexes"
---

import Formbricks from '@theme/MDXComponents/Formbricks';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import { TabItemLabel } from '@selectel/docux/components';
import MoreVerticalIcon from '@selectel/docux/icons/more-vertical';

# Backups in an OpenSearch cluster

OpenSearch Managed Databases automatically create index backups. You do not need to configure and monitor backups yourself.

To create index backups, the built-in OpenSearch snapshot mechanism is used. A snapshot is a capture of the current state of indices and data. Learn more about the snapshot mechanism in the [Take and restore snapshots](https://docs.opensearch.org/latest/tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore/) OpenSearch documentation.

Backups are created incrementally:

* the first backup contains a full copy of all data;
* all subsequent backups contain only the changes since the previous successful backup.

Backups can be used to [restore indices](#restore-indexes-from-backups) only in the cluster where they were created. Once a cluster is deleted, index backups are not stored. You cannot restore a cluster or create a new one from the index backups of a deleted cluster.

Backups are stored in isolation from other users' backups.

Backups cannot be downloaded. Automatic backup creation cannot be disabled.

## Backup schedule \{#backup-schedule}

Index backups are created every 30 minutes.

## Backup retention period \{#backup-retention-period}

Index backups are stored for 7 days.

## Restore indexes from a backup \{#restore-indexes-from-backups}

You can restore indices from backups via the OpenSearch API or the OpenSearch Dashboards web interface. You cannot restore system indices containing the global state and cluster settings, for example, `.opendistro_security`.

<Tabs queryString="restore-indexes-from-backups">
  <TabItem value="api" default>
    <TabItemLabel>
      OpenSearch API
    </TabItemLabel>

    1. Get the date and time of the backup from which you want to restore indices. To do this, list the backups:

       ```bash
       curl -XGET -u 'admin:<password>' \
       --cacert ~/.opensearch/root.crt \
       'https://<ip_address>:<port>/_cat/snapshots/dbaas-repo'
       ```

       Specify:

       * `<password>` — administrator password;
       * `<ip_address>` — node IP address;
       * `<port>` — [connection port](/managed-databases/opensearch/connect-to-cluster.mdx#connection-ports).

       The response will contain a list of backups. Copy the date and time of creation from the backup name—they are specified in the `yyyymmdd-hh-mm` format. For example:

       ```bash
       dbaas-snapshot-20250928-09-48 SUCCESS 1759052881 09:48:01 1759052883 09:48:03  1.8s 5 5 0 5
       dbaas-snapshot-20250928-10-18 SUCCESS 1759054681 10:18:01 1759054682 10:18:02 600ms 5 5 0 5
       dbaas-snapshot-20250928-10-48 SUCCESS 1759056481 10:48:01 1759056482 10:48:02 600ms 5 5 0 5
       ```

       Here `20250928-09-48`, `20250928-10-18` and `20250928-10-48` are the date and time the backups were created.

    2. Get the names of the indices you want to restore. To do this, output information about the backup:

       ```bash
       curl -XGET -u 'admin:<password>' \
       --cacert ~/.opensearch/root.crt \
       'https://<ip_address>:<port>/_snapshot/dbaas-repo/dbaas-snapshot-<timestamp>?pretty'
       ```

       Specify:

       * `<password>` — administrator password;
       * `<ip_address>` — node IP address;
       * `<port>` — [connection port](/managed-databases/opensearch/connect-to-cluster.mdx#connection-ports);
       * `<timestamp>` — date and time of the backup provided in step 1.

       In the `indices` field, copy the names of the indexes to restore.

    3. Check if there are any open indices in the cluster with the same names as those you want to restore. To do this, output information about all open indices:

       ```bash
       curl -XGET -u 'admin:<password>' \
       --cacert ~/.opensearch/root.crt \
       'https://<ip_address>:<port>/_cat/indices?v&h=index,health,status,docs.count,store.size&s=index&expand_wildcards=open,hidden'
       ```

       Specify:

       * `<password>` — administrator password;
       * `<ip_address>` — node IP address;
       * `<port>` — [connection port](/managed-databases/opensearch/connect-to-cluster.mdx#connection-ports).

       Index names will be specified in the `index` field.

    4. If there are already open indices in the cluster with the same names as those you want to restore, delete them. In an OpenSearch cluster, you cannot duplicate the names of open indices.

       ```bash
       curl -XDELETE -u 'admin:<password>' \
       --cacert ~/.opensearch/root.crt \
       'https://<ip_address>:<port>/<index>'
       ```

       Specify:

       * `<password>` — administrator password;
       * `<ip_address>` — node IP address;
       * `<port>` — [connection port](/managed-databases/opensearch/connect-to-cluster.mdx#connection-ports);
       * `<index>` — the name of the index to be deleted. If you need to specify multiple indices, separate them with a comma.

    5. Restore indexes:

       ```bash
       curl -XPOST -u 'admin:<password>' --cacert ~/.opensearch/root.crt 'https://<ip_address>:<port>/_snapshot/dbaas-repo/dbaas-snapshot-<timestamp>/_restore' \
       -H 'Content-Type: application/json' \
       -d '{
           "indices": "<index>",
           "include_global_state": false
           }'
       ```

       Specify:

       * `<password>` — administrator password;
       * `<ip_address>` — node IP address;
       * `<port>` — [connection port](/managed-databases/opensearch/connect-to-cluster.mdx#connection-ports);
       * `<timestamp>` — date and time of the backup provided in step 1; ;
       * `<index>` — the name of the index to be restored. If you need to specify multiple indices, separate them with a comma.
  </TabItem>

  <TabItem value="dashboards">
    <TabItemLabel>
      OpenSearch Dashboards
    </TabItemLabel>

    :::info

    To restore indexes via the OpenSearch Dashboards web interface, a [public IP address](/managed-databases/opensearch/public-ip.mdx) must be attached to the [node group with the Dashboard role](/managed-databases/opensearch/about-node-groups.mdx#dashboard-node-groups).

    :::

    1. In the [Dashboard](https://my.selectel.ru/vpc/default/dbaas/), on the top menu, click **Products** and select **Managed Databases**.

    2. Open the **Active** tab.

    3. Open the database cluster page.

    4. In the <MoreVerticalIcon /> menu of the cluster, select **Dashboards**.

    5. In the **Username** field, enter the administrator username — admin.

    6. In the **Password** field, enter the password — it is set when [creating the cluster](/managed-databases/opensearch/create-cluster.mdx). After the cluster is created, you cannot view the password in the Control Panel, but you can [change it](/managed-databases/opensearch/manage-users.mdx#change-administrators-password).

    7. Click **Log in**.

    8. In the top-left corner of the OpenSearch Dashboards web interface, open the menu and select **Snapshot Management** → **Snapshots** → вкладка **Snapshots**.

    9. Select the backup from which you want to restore indexes.

    10. Click **Restore**.

    11. In the **Specify restore option** field, select **Restore specific indices**.

    12. Select the indexes you want to restore.

    13. In the **Rename restored indices** field, select a rule for naming the restored indices:

        * **Do not rename** — do not change index names during restoration. Use this rule only if there are no open indices in the cluster with the same names—in OpenSearch, you cannot duplicate the names of open indices; ;
        * **Add prefix to restored index names** — add a prefix to the names of the restored indices;
        * **Rename using regular expression (Advanced)** — rename indices using a regular expression.

    14. In the **Advanced options** block:

        * uncheck the **Restore cluster state from snapshots**;
        * optionally: select additional parameters. Learn more about additional parameters for index restoration in the [Take and restore snapshots](https://docs.opensearch.org/latest/tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore/) OpenSearch documentation.

    15. Click **Restore snapshot**.
  </TabItem>
</Tabs>
