Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Aws Tutorials: OpenSearch – Backup and Restore

Snapshots

Snapshots in Amazon OpenSearch Service are backups of a cluster’s indexes and state. State includes cluster settings, node information, index settings, and shard allocation.

OpenSearch Service snapshots come in the following forms:

  • Automated snapshots are only for cluster recovery. You can use them to restore your domain in the event of red cluster status or data loss. For more information, see Restoring snapshots below. OpenSearch Service stores automated snapshots in a preconfigured Amazon S3 bucket at no additional charge.
  • Manual snapshots are for cluster recovery or for moving data from one cluster to another. You have to initiate manual snapshots. These snapshots are stored in your own Amazon S3 bucket and standard S3 charges apply. If you have a snapshot from a self-managed OpenSearch cluster, you can use that snapshot to migrate to an OpenSearch Service domain. For more information, see Migrating to Amazon OpenSearch Service.

FAQ on Opensearch Snapshot on AWS

What is a snapshot?

A snapshot is a copy of your Amazon OpenSearch Service domain at a moment in time.

Why would I need snapshots?

Creating snapshots can be useful in case of data loss caused by node failure, as well as the unlikely event of a hardware failure. You can use snapshots to recover your Amazon OpenSearch Service domain with preloaded data or to create a new Amazon OpenSearch Service domain with preloaded data. Another common reason to use backups is for archiving purposes. Snapshots are stored in Amazon S3.

 Does Amazon OpenSearch Service provide automated snapshots?

Yes. By default, Amazon OpenSearch Service automatically creates hourly snapshots of each Amazon OpenSearch Service domain and retains them for 14 days.

 How long are the automated daily hourly snapshots stored by Amazon OpenSearch Service?

Amazon OpenSearch Service will retain the last 14 days worth of automated hourly snapshots.

Is there a charge for the automated daily hourly snapshots?

There is no additional charge for the automated hourly snapshots. The snapshots are stored for free in an Amazon OpenSearch Service S3 bucket and will be made available for node recovery purposes.

 Can I create additional snapshots of my Amazon OpenSearch Service domains as needed?

Yes. You can use the snapshot API to create additional manual snapshots in addition to the daily-automated snapshots created by Amazon OpenSearch Service. The manual snapshots are stored in your S3 bucket and will incur relevant Amazon S3 usage charges.

Can snapshots created by the manual snapshot process be used to recover a domain in the event of a failure?

Yes. Customers can create a new Amazon OpenSearch Service domain and load data from the snapshot into the newly created Amazon OpenSearch Service domain using the OpenSearch/Elasticsearch restore API.

 What happens to my snapshots when I delete my Amazon OpenSearch Service domain?

The daily snapshots retained by Amazon OpenSearch Service will be deleted as part of domain deletion. Before deleting a domain, you should consider creating a snapshot of the domain in your own S3 buckets using the manual snapshot process. The snapshots stored in your S3 bucket will not be affected if you delete your Amazon OpenSearch Service domain.

Restoring a New OpenSearch Domain from an Automatic Snapshot

Restoring a new OpenSearch domain from an automatic snapshot taken by AWS is not directly supported through the AWS Management Console. Automatic snapshots in Amazon OpenSearch Service are designed primarily for in-place recovery of existing domains rather than creating new domains. These snapshots are stored in an internal AWS S3 bucket and are not directly accessible to users for creating new domains.

Here’s a summary of the current situation:

1.  Purpose of Automatic Snapshots: Automatic snapshots are intended for disaster recovery and are used to restore the state of the existing domain in case of failures like a red cluster status. They are taken hourly and retained for 14 days  .
2.  Restoring Existing Domains: You can restore an existing domain to a previous state using the automatic snapshots, but AWS does not provide an option to restore these snapshots to a new domain directly  .
3.  Manual Snapshots for New Domains: To create a new domain with the same data, you should use manual snapshots. You can take manual snapshots, store them in your own S3 bucket, and then use these snapshots to restore data into a new domain  .
4.  Recommended Approach: It is recommended to regularly create manual snapshots if you need to ensure that you can quickly restore data into a new domain or migrate data across different environments. These manual snapshots can be registered and restored using the OpenSearch APIs and AWS CLI tools  .

Reference

Creating index snapshots in Amazon OpenSearch Service

Creating index snapshots in Amazon OpenSearch Service

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x