![](/style/images/good.png)
![](/style/images/bad.png)
Copy OpenSearch index data to S3
source link: https://dev.to/laysauchoa/copy-opensearch-index-data-to-s3-27bb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
opensearch (2 Part Series)
It is a good practice to perform backups of your OpenSearch data to another storage service. This way you can access your data and restore it if something unexpected happens to it.
In this article, you can find out how to dump your OpenSearch data to
an:
- AWS S3 bucket
To copy the index data, we will be using elasticsearch-dump
tool. You can read the [instructions on GitHub (https://github.com/elasticsearch-dump/elasticsearch dump/blob/master/README.md) on how to install it. From this library, we will use elasticdump
command to copy the input index data to a specific output.
Make sure to have elasticsearch-dump
tool installed for the next steps.
Copying data from OpenSearch to AWS S3
Prerequisites
- OpenSearch cluster as the
input
- AWS S3 bucket as the
output
You need to collect the following information about your OpenSearch cluster and your AWS service:
OpenSearch:
-
SERVICE_URI
: OpenSearch service URI. -
INPUT_INDEX_NAME
: the index that you aim to copy from your input source.
AWS S3:
- AWS credentials (
ACCESS_KEY_ID
andSECRET_ACCESS_KEY
). - S3 file path. This includes bucket name and file name, for e.g.
s3://${BUCKET_NAME}/${FILE_NAME}.json
Find more information about AWS credentials in the AWS docs.
Export OpenSearch index data to S3
Use elasticsearch-dump
command to copy the data from your OpenSearch cluster to your AWS S3 bucket. Use your
OpenSearch SERVICE_URI
for the input
. For the output
, choose an AWS S3 file path including the file name that you want for your document.
elasticdump \
--s3AccessKeyId "${ACCESS_KEY_ID}" \
--s3SecretAccessKey "${SECRET_ACCESS_KEY}" \
--input=SERVICE_URI/INPUT_INDEX_NAME --output "s3://${BUCKET_NAME}/${FILE_NAME}.json"
Enter fullscreen mode
Exit fullscreen mode
That is how you can copy your OpenSearch data to a S3 bucket. 🙋🏻♀️
Recommend
-
22
Firefox removed the separate search field from the address bar in Firefox 57. Firefox 61 doesn’t bring that back, but it adds back the ability to quickly install new search providers.
-
5
Introducing OpenSearch by Carl Meadows, Jules Graybill, Kyle Davis, and Mehul Shah | on 12 APR 2021 | in ...
-
8
OpenSearch Hello! OpenSearch is an open source search and analytics engine derived from Elasticsearch 7.10.2, and is currently in an alpha state. While we're still in the process of getting set up, we are excited to build the...
-
11
OpenSearch Dashboards Hello! OpenSearch Dashboards is an open source search and analytics visualization derived from Kibana 7.10.2, and is currently in an alpha state. While we're still in the process of getting set up, we are...
-
19
AWS 對 Elasticsearch 的戰爭:OpenSearch AWS 對 Elasticsearch 的戰爭繼續升溫,AWS 出來喊,搞了自己的 community 要跟本家 PK:「
-
11
OpenSearch: AWS fork of Elasticsearch and Kibana It's hard for me to know whether to feel bad for ES in this case. Did they bring it on themselves? Is Amazon too big and a bully?From my pe...
-
10
Elasticsearch 的 Python 套件開始阻擋 OpenSearch 的伺服器了 在 Hacker News Daily 上看到的:「Official Elasticsearch Pyth...
-
12
Keeping clients of OpenSearch and Elasticsearch compatible with open source by Eli Fisher, Carl Meadows, Jules Graybill, Kyle Davis, and Mehul Shah | on 04 AUG 2021 | in
-
10
AWS Announces Amazon OpenSearch Ingestion for Streamlined Data Ingestion May 02, 2023...
-
7
This article is based on internal documentation from CyberSift, and since this seems to be a problem which others might run into, I’ve posted it here Problem scenario...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK