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.

Index backups are created using the built-in OpenSearch snapshot mechanism. A snapshot is a replica of the current index state and data. Learn more about the snapshot mechanism in the Take and restore snapshots section of the 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.

You can restore indices only within the cluster where they were created. Index backups are not stored after a cluster is deleted. 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 indexes from backups via the OpenSearch API or the OpenSearch Dashboards web interface. You cannot restore system indexes that contain global cluster state and settings, such as .opendistro_security.

  1. Get the date and time of the backup from which you want to restore indexes. 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 list of backups will appear in the response. Copy the date and time of the backup creation from the backup name — they are provided 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 indexes you want to restore. To do this, retrieve backup information:

    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 indexes in the cluster with the same names as those you want to restore. To do this, retrieve information about all open indexes:

    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 the cluster already contains open indexes with the same names as those you want to restore, delete them. You cannot have duplicate names for open indexes in an OpenSearch cluster.

    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> — name of the index to delete. 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> — name of the index to restore. If you need to specify multiple indices, separate them with a comma.