Skip to main content

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 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 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

Index backups are created every 30 minutes.

Backup retention period

Index backups are stored for 7 days.

Restore indexes from a backup

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.

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

    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.

    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:

    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:

    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;
    • <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:

    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.

    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.

    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;
    • <index> — the name of the index to be deleted. If you need to specify multiple indices, separate them with a comma.
  5. Restore indexes:

    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;
    • <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.