# Import Elasticsearch index by copying the folder to a second elasticsearch instance?

**URL:** <https://discuss.elastic.co/t/import-elasticsearch-index-by-copying-the-folder-to-a-second-elasticsearch-instance/21259>\
**Category:** Elasticsearch\
**Created:** [December 15, 2014, 2:50pm UTC](https://discuss.elastic.co/t/import-elasticsearch-index-by-copying-the-folder-to-a-second-elasticsearch-instance/21259 "2014-12-15T14:50:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grauen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grauen/32/88529_2.png) [@Grauen](https://discuss.elastic.co/u/Grauen)\
**Post date:** [December 15, 2014, 2:50pm UTC](https://discuss.elastic.co/t/import-elasticsearch-index-by-copying-the-folder-to-a-second-elasticsearch-instance/21259/1 "2014-12-15T14:50:36Z")

</div>

I tried to copy a closed index to a backup elasticsearch instance.  
I just used SCP and copied the Index folder to the same folder of the  
backup server.

When I try to reopen the index on the backup server using '-XPOST  
/logstash-2014.10.11/\_open', I get the IndexNotFoundException. When I use  
-XPUT to create the index the index will be generated but Elasticsearch  
won't use the existing Data in the folder, so the doc.count is 0.

health index pri rep docs.count docs.deleted store.size pri.store.size  
yellow logstash-provisioningmanager-2014.10.29 5 1 0 0 575b 575b

Since I have no space left on my primary elasticsearch server, I just want  
to move the indices, without using a repository. Is this even possible?

Sincerly,

Grauen

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/aee602aa-72f5-44f1-b84a-eb9da0e7e277%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/aee602aa-72f5-44f1-b84a-eb9da0e7e277%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sachin\_Divekar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sachin_divekar/32/1046_2.png) [@Sachin\_Divekar](https://discuss.elastic.co/u/Sachin_Divekar)\
**Post date:** [December 15, 2014, 4:24pm UTC](https://discuss.elastic.co/t/import-elasticsearch-index-by-copying-the-folder-to-a-second-elasticsearch-instance/21259/2 "2014-12-15T16:24:40Z")

</div>

Perhaps you can use snapshot and restore feature of Elasticsearch. You can  
mount a NFS or samba share from remote server to take snapshot and then  
restore it there locally using same snapshot and restore module. Refer

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Sachin Divekar

On Mon, Dec 15, 2014, 8:20 PM Grauen [allmightygoot@googlemail.com](mailto:allmightygoot@googlemail.com) wrote:

> I tried to copy a closed index to a backup elasticsearch instance.  
> I just used SCP and copied the Index folder to the same folder of the  
> backup server.
> 
> When I try to reopen the index on the backup server using '-XPOST  
> /logstash-2014.10.11/\_open', I get the IndexNotFoundException. When I use  
> -XPUT to create the index the index will be generated but Elasticsearch  
> won't use the existing Data in the folder, so the doc.count is 0.
> 
> health index pri rep docs.count docs.deleted store.size pri.store.size  
> yellow logstash-provisioningmanager-2014.10.29 5 1 0 0 575b 575b
> 
> Since I have no space left on my primary elasticsearch server, I just want  
> to move the indices, without using a repository. Is this even possible?
> 
> Sincerly,
> 
> Grauen
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/aee602aa-72f5-44f1-b84a-eb9da0e7e277%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/aee602aa-72f5-44f1-b84a-eb9da0e7e277%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/aee602aa-72f5-44f1-b84a-eb9da0e7e277%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/aee602aa-72f5-44f1-b84a-eb9da0e7e277%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CA%2BA8H7k6NkYytLx3UXWL7G\_dem-c8RNEc%2BOdX0mzLNvjq6vCKQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2BA8H7k6NkYytLx3UXWL7G_dem-c8RNEc%2BOdX0mzLNvjq6vCKQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:43am UTC](https://discuss.elastic.co/t/import-elasticsearch-index-by-copying-the-folder-to-a-second-elasticsearch-instance/21259/3 "2017-07-06T00:43:40Z")

</div>


