Backups in an OpenSearch cluster
OpenSearch cloud databases automatically create index backups, so you don't have to configure and monitor backups yourself.
OpenSearch's built-in snapshot mechanism is used to create index backups.A snapshot is a snapshot of the current state of indexes with data.For more information about the snapshot mechanism, see the Take and restore snapshots instruction in the OpenSearch documentation.
Backups are created incrementally:
- the first backup contains a complete copy of all data;
- all subsequent backups contain only the changes since the previous successful backup.
You can restore indexes from backups only in the cluster in which they were created.After a cluster is deleted, index backups are not stored.You cannot restore a cluster or create a new one from index backups of a deleted cluster.
Backups are stored in isolation from other users' backups.
Backups cannot be uploaded.Automatic backup creation cannot be disabled.
Backup schedule
Index backups are created once every 30 minutes.
Backup retention period
Index backups are stored for 7 days.
Restore indexes from backup
You can restore your indexes from backups via OpenSearch API.You can restore individual indexes or all indexes at once, except system indexes.
Restore individual indexes
Restore all indexes
-
Get the date and time of creation of the backup from which you want to restore indexes.To do this, output the list of backups:
curl -XGET -u 'admin:<password>' \
--cacert ~/.opensearch/root.crt \
'https://<ip_address>:<port>/_cat/snapshots/dbaas-repo'Specify:
<password>
— password of the admin user;<ip_address>
— IP address of the node;<port>
— port for connection.
A list of backups will appear in the response.Copy from the backup name the date and time of its creation — they are specified in the format
yyyyymmdd-hh-mm
. 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 5Here
20250928-09-48
,20250928-10-18
, and20250928-10-48
are the date and time the backups were created. -
Get the names of the indexes that need to be restored.To do this, output the backup information:
curl -XGET -u 'admin:<password>' \
--cacert ~/.opensearch/root.crt \
'https://<ip_address>:<port>/_snapshot/dbaas-repo/dbaas-snapshot-<timestamp>?pretty'Specify:
<password>
— password of the admin user;<ip_address>
— IP address of the node;<port>
— port for connection;<timestamp>
— the date and time of backup creation that you got in step 1.
The response will show information about the backup.In the
"indices"
field, copy the names of the indexes to be restored. -
Check if there are any open indexes in the cluster with the same names that you want to restore.To do this, print 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>
— password of the admin user;<ip_address>
— IP address of the node;<port>
— port for connection.
The names of the indexes will be specified in the
index
field. -
If there are already open indexes in the cluster with the same names that you want to restore, delete them.You cannot duplicate open index names in an OpenSearch cluster.
curl -XDELETE -u 'admin:<password>' \
--cacert ~/.opensearch/root.crt \
'https://<ip_address>:<port>/<index>'Specify:
<password>
— password of the admin user;<ip_address>
— IP address of the node;<port>
— port for connection;<index>
— name of the index to delete.If you want to specify multiple indexes, separate them with a comma.
-
Restore the 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>
— password of the admin user;<ip_address>
— IP address of the node;<port>
— port for connection;<timestamp>
— the date and time of backup creation that you got in step 1;<index>
— name of the index to be restored.If you need to specify multiple indexes, separate them with a comma.
-
Get the date and time of creation of the backup from which you want to restore indexes.To do this, output the list of backups:
curl -XGET -u 'admin:<password>' \
--cacert ~/.opensearch/root.crt \
'https://<ip_address>:<port>/_cat/snapshots/dbaas-repo'Specify:
<password>
— password of the admin user;<ip_address>
— IP address of the node;<port>
— port for connection.
A list of backups will appear in the response.Copy from the backup name the date and time of its creation — they are specified in the format
yyyyymmdd-hh-mm
. 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 5Here
20250928-09-48
,20250928-10-18
, and20250928-10-48
are the date and time the backups were created. -
To avoid index name conflicts when restoring indexes, delete all open indexes except system indexes.You cannot duplicate open index names in an OpenSearch cluster.
curl -XDELETE -u 'admin:<password>' \
--cacert ~/.opensearch/root.crt \
'https://<ip_address>:<port>/*,-.*'Specify:
<password>
— password of the admin user;<ip_address>
— IP address of the node;<port>
— port for connection.
-
Restore the 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": "-.*",
"include_global_state": false
}'Specify:
<password>
— password of the admin user;<ip_address>
— IP address of the node;<port>
— port for connection;<timestamp>
— the date and time of backup creation that you got in step 1.
All indexes except system indexes will be restored.