How to migrate data from localhost to Azure host

Hi, I'm fairly new to ES, and would appreciate any help!
I've attempted to follow the two different ways to migrate data that was stated in https://www.elastic.co/guide/en/cloud/current/ec-migrate-data.html

However, I'm facing issues with both. With the reindexing from a remote cluster, i added reindex.remote.whitelist: localhost:* , to the remote host elasticsearch.yml. And then I ran the following code on my new azure es host:

POST _reindex
{
"source": {
"remote": {
"host": "http://localhost:5601"
},
"index": "xxx",
"query": {
"match_all": {}
}
},
"dest": {
"index": "xxx"
}
}

However, I get this error: Response didn't include Content-Type: body=var hashRoute = '/app/kibana';\nvar defaultRoute = '/app/kibana';\n\nvar hash = window.location.hash.....

I then tried the snapshot method, on the localhost I ran:

PUT /_snapshot/my_backup
{
"type": "fs",
"settings": {
"location": "my_backup",
"compress": "true"
}
}
With the path included in the local host .yml. The get command runs fine on the new snapshot. But, I get repository errors on the remote host when i try to use PUT, to migrate the data.

My remote host is on the azure portal, but I can't do anything until I transfer the work done on my local computer. Any help would be appreciated!
Thank you.

You can't use reindex from remote when the remote host is not accessible from the Azure node which is obviously the case here.

You can may be configure an azure snapshot repository in both clusters, snapshot from localhost the and then restore on Azure node.

Creating the snapshot on my local computer works, but when i try to retrieve it on the ES which is running on azure vm, I still get repository errors when I use PUT.

If i were to reindex, how do I make the local ES accessible to the ES on azure?

Which are?

You need to expose your machine on internet. That's a network question, not really an elasticsearch one. And I doubt you want to expose your elasticsearch cluster to internet without any kind of security. Or at least I'd not do that.

Another solution is to use Logstash.
You can run Logstash locally and use an elasticsearch input which reads your local data and use an elasticsearch output which writes to your azure instance.

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