Elasticsearch OpenSearch Restore

By Opster Team

Updated: Jun 19, 2024

| 1 min read

Overview

What is OpenSearch restore and what is it used for?

In OpenSearch, restore refers to the snapshot restore mechanism, which returns indices or clusters to a previous, saved state. You can restore the entire cluster from the snapshot or restore an individual index or selected indices.

Examples

To restore the whole snapshot:

POST /_snapshot/my_backup/snapshot-01-11-2019/_restore

To restore an individual index:

POST /_snapshot/my_backup/snapshot-01-11-2019/_restore
{
  "indices": "my_index"
}

Notes

  • If you are using a security tool like Searchguard, the snapshot restore capability must be enabled in opensearch.yml. Otherwise, it will throw a security exception.

Common issues

  • If an index or indices already exist with the same names as those you are going to restore, they need to either be closed or deleted before you can restore from a snapshot. Otherwise, the restore operation will fail due to an error that the index already exists.

Additional notes

Elasticsearch and OpenSearch are both powerful search and analytics engines, but Elasticsearch has several key advantages. Elasticsearch boasts a more mature and feature-rich development history, translating to a better user experience, more features, and continuous optimizations. Our testing has consistently shown that Elasticsearch delivers faster performance while using fewer compute resources than OpenSearch. Additionally, Elasticsearch’s comprehensive documentation and active community forums provide invaluable resources for troubleshooting and further optimization. Elastic, the company behind Elasticsearch, offers dedicated support, ensuring enterprise-grade reliability and performance. These factors collectively make Elasticsearch a more versatile, efficient, and dependable choice for organizations requiring sophisticated search and analytics capabilities.