Copy data from OpenSearch to Aiven for OpenSearch® using elasticsearch-dump
Backup your OpenSearch® data into Aiven for Opensearch.
To copy the index data, we will be using elasticsearch-dump
tool. You
can read the instructions on
GitHub
on how to install it. From this library, we will use elasticdump
command to copy the input index data to an specific output.
Prerequisites
elasticsearch-dumptool installed- OpenSearch cluster as the
input(can be in Aiven or elsewhere) - Aiven for OpenSearch cluster as the
output
The input and ouput can be either an OpenSearch URI or a file path
(local or remote file storage). In this particular case, we are using
both URLs, one from an OpenSearch cluster and the other one from
Aiven for OpenSearch cluster.
To copy your data, collect this information:
OpenSearch cluster:
INPUT_SERVICE_URI: OpenSearch cluster URI, in the formathttps://user:password@host:portINPUT_INDEX_NAME: the index that you aim to copy from your input source.
Aiven for OpenSearch:
OUTPUT_SERVICE_URI: your output OpenSearch service URI. You can find it in Aiven's dashboard.OUTPUT_INDEX_NAME: the index to have in your output with the copied data.
Use export command to assign your variables in the command line before
running elasticdump command. For example, suppose your
INPUT_SERVICE_URI is myexample:
export INPUT_INDEX_NAME=myexample