Copy a remote index using Reindex API

Hi,

I have a running Elastic node with an index. I'm constantly inserting documents into the index in a process that I can't stop. The whole process is running in a remote server. I need to make a copy of the index into my local machine in order to experiment with the data

Is it possible to make a copy of the index into my local machine without interrupting the data ingestion in the server's node using _reindex?

Best regards.

@tmslara.a I believe reindex won't be possible since it will essentially create a new index in your remote cluster. Instead, you can

  1. either setup CCR for cross cluster replication of your desired indices, or
  2. take a snapshot in remote server, configure same bucket in your local cluster and restore there.

Thanks for your answer. It is useful to me if I can bring information from the remote index into a local index (new). Can I do this with reindex?

I explored the possibility of using snapshot but is not possible in my case since I didn't configure the snapshot repo.

Yes. You can reindex from the existing remote cluster. This will reindex all the data that was persent in the index at the time you started the reindexing. The remote cluster you are reading from can still continue to receive new data.

1 Like

As Christian said you can use reindex from remote, on your local node you will need to configure reindex.remote.whitelist pointing to your remote host to allow the reindex, you will run the reindex request in your local node.

Keep in mind that the reindex will not get new documents created after you started the reindex process.

2 Likes

Oh cool, I was under the impression that reindexing has more implications than snapshot/restore and that it can be used only between two Elastic cloud clusters for data migration, but not with self managed deployment.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.