# How to move Elasticsearch indexes from one server to another one

**URL:** <https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909>\
**Category:** Elasticsearch\
**Created:** [October 9, 2015, 1:09pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909 "2015-10-09T13:09:08Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![billy6](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@billy6](https://discuss.elastic.co/u/billy6)\
**Post date:** [October 9, 2015, 1:09pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/1 "2015-10-09T13:09:08Z")

</div>

I would like to know how to move Elasticsearch indexes from one server to another one, with different versions of the software. Is there any plugin for it?  
Could I do it with ES head plugin?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 10, 2015, 2:26am UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/2 "2015-10-10T02:26:19Z")

</div>

Use snapshot and restore - [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html)  
Or Logstash with something like this - [https://gist.github.com/markwalkom/8a7201e3f6ea4354ae06](https://gist.github.com/markwalkom/8a7201e3f6ea4354ae06)

You can shutdown the current node and then copy the data over too, but be careful with that.

---

<div class="post-metadata">

**Author:** ![billy6](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@billy6](https://discuss.elastic.co/u/billy6)\
**Post date:** [October 12, 2015, 6:51am UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/3 "2015-10-12T06:51:45Z")

</div>

But would Snapshot and restore work if the server is in another machine with another different cluster?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 12, 2015, 7:02am UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/4 "2015-10-12T07:02:16Z")

</div>

Yes, as long as you aren't going from a newer version to an older one.

---

<div class="post-metadata">

**Author:** ![billy6](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@billy6](https://discuss.elastic.co/u/billy6)\
**Post date:** [October 12, 2015, 7:38am UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/5 "2015-10-12T07:38:26Z")

</div>

I'm trying with \>

curl -XPUT '[http://localhost:9200/\_snapshot/my\_backup](http://localhost:9200/_snapshot/my_backup)' -d '{  
"type": "fs",  
"settings": {  
"location": "/etc/elasticsearch/backups/",  
"compress": true  
}  
}'

but I get \> No handler found for uri [/\_snapshot/my\_backup] and method [PUT]

...Sorry I'm very newbie in Elasticsearch

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 12, 2015, 7:57am UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/6 "2015-10-12T07:57:36Z")

</div>

Are you using elasticsearch 0.90?

---

<div class="post-metadata">

**Author:** ![billy6](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@billy6](https://discuss.elastic.co/u/billy6)\
**Post date:** [October 13, 2015, 2:32pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/8 "2015-10-13T14:32:32Z")

</div>

I have tried this logstash configuration but when I have a big amount of data it stucks at 50000. And I have no idea why..

 ![](https://us1.discourse-cdn.com/elastic/original/2X/5/5593a64167c139fcab35e8d79e3ba2c79ed5b590.PNG)

In this image should appear more eventsbetween 3.00 to 23.00, and I'm receiving no data. It seems like if it has received only the first 50000 messages and stop in that moment...

And I'm obtaining warnings in Kibana like --\> "Courier Fetch: 1 of 145 shards failed."

---

<div class="post-metadata">

**Author:** ![billy6](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@billy6](https://discuss.elastic.co/u/billy6)\
**Post date:** [October 13, 2015, 4:14pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/9 "2015-10-13T16:14:16Z")

</div>

No, is 1.1.1

---

<div class="post-metadata">

**Author:** ![Andrea\_Renzi](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@Andrea\_Renzi](https://discuss.elastic.co/u/Andrea_Renzi)\
**Post date:** [January 14, 2016, 1:20pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/10 "2016-01-14T13:20:01Z")

</div>

I've got the same problem in 1.7. Solved changing to the right verb, POST not PUT.

[https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html](https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html)

> **[Introducing Snapshot & Restore
	  	 | Elastic](https://www.elastic.co/blog/introducing-snapshot-restore)**
>
> In the last year, we saw a tremendous increase in adoption of Elasticsearch by many companies. As more and more companies are using Elasticsearch as an integral part of their business, high availabili...

Andrea

---

<div class="post-metadata">

**Author:** ![jolbax](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jolbax/32/10039_2.png) [@jolbax](https://discuss.elastic.co/u/jolbax)\
**Post date:** [May 31, 2016, 11:56am UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/11 "2016-05-31T11:56:22Z")

</div>

Hi @warkolm, @dadoonet,

I am facing a similar challenge with elasticsearch 2.3.2  
In terms of an strict deployment process I have to deploy ES indexes on a test, staging and production environment.  
The index binaries are created on a dev environment. And we are copying them to all platforms as you described (shutdown the ES node/cluster and copying data over)

My question is first of all, is this a supported approach?  
and second, why do you mean that one should be careful? Which are the critical aspects?

Thanks for your advice

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 31, 2016, 11:42pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/12 "2016-05-31T23:42:32Z")

</div>

It's not really supported no, we'd suggest snapshots instead.

---

<div class="post-metadata">

**Author:** ![jolbax](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jolbax/32/10039_2.png) [@jolbax](https://discuss.elastic.co/u/jolbax)\
**Post date:** [June 3, 2016, 12:45pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/13 "2016-06-03T12:45:10Z")

</div>

Hi again @warkolm,

Thanks for your answer. But could you be a bit more specific.  
I mean, in the second post of this discussion you mentioned that this is also an approach to go.

We have had success using this approach. But before we continue using it, we would like to know which aspects are important/critical to take care of.

So my question is, why it is not supported? which are the disadvantages of doing in this way?

Snapshots represent a further time/resource consuming task.

Thanks again for your advice

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 4, 2016, 1:49am UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/14 "2016-06-04T01:49:31Z")

</div>

It's not supported because if it breaks then we won't put fixes into the software to help this use.  
If you snapshot and something goes wrong, then if we can fix it we will.

---

<div class="post-metadata">

**Author:** ![bbrutman](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bbrutman](https://discuss.elastic.co/u/bbrutman)\
**Post date:** [March 20, 2017, 1:34pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/15 "2017-03-20T13:34:39Z")

</div>

Hi Mark,

Can you please elaborate on the option of copying files. We are looking for a super fast copying of an index (1 Shard, Read-Only, ~5GB, ~1M documents) from an indexing cluster to a query cluster. The source cluster has 0 replicas target cluster has 47 replicas. When using backup-restore it is taking ~20Min.

How can we take advantage of the fact that the index is merged and is read only for taking the minimal path.

Any thoughts on the subject would be appreciated!

Baruch.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 20, 2017, 8:29pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/16 "2017-03-20T20:29:27Z")

</div>

Shut the node down, copy the data, start it back up and hope it works.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:02pm UTC](https://discuss.elastic.co/t/how-to-move-elasticsearch-indexes-from-one-server-to-another-one/31909/17 "2017-07-05T22:02:04Z")

</div>


