# Export Index and structure

**URL:** https://discuss.elastic.co/t/export-index-and-structure/161700
**Category:** Elasticsearch
**Created:** [December 20, 2018, 12:49pm UTC](https://discuss.elastic.co/t/export-index-and-structure/161700 "2018-12-20T12:49:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Tom28](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@Tom28](https://discuss.elastic.co/u/Tom28)
#### Post date: [December 20, 2018, 12:49pm UTC](https://discuss.elastic.co/t/export-index-and-structure/161700/1 "2018-12-20T12:49:16Z")

</div>

Hi

I have currently a very old installation of Elasticsearch on a node with 3 indexes and maybe about 1000 documents.

I have now installed a the newest version and would import all of the current environment to the new node but without any data.

That means:

Indexes, Analyzer, Mappings, Setting, just everything defined on the current node....

What is the best way to do that to be sure that nothing is lost?

I would then run one script per index and import the structure without any data.

Thanks  
Thomas

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [December 20, 2018, 2:01pm UTC](https://discuss.elastic.co/t/export-index-and-structure/161700/2 "2018-12-20T14:01:49Z")

</div>

You do not specify how old your "very old" installation of Elasticsearch is, but I expect there will have been changes between that version and the newest ones that mean you can't simply port everything across without making some adaptations.

You will be able to use APIs to get the [mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html) and [settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html) for each index.

---

<div class="post-metadata">

### Author: ![Tom28](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@Tom28](https://discuss.elastic.co/u/Tom28)
#### Post date: [December 20, 2018, 2:32pm UTC](https://discuss.elastic.co/t/export-index-and-structure/161700/3 "2018-12-20T14:32:46Z")

</div>

Hi David

thanks for reply. The version installed is 0.90.13.

As think that I cannot change the mappings after creation of the index neither the settings, do I have to merge the two exported scripts for mapping and settings then to newly crete the index?

Thomas

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [December 20, 2018, 3:28pm UTC](https://discuss.elastic.co/t/export-index-and-structure/161700/4 "2018-12-20T15:28:15Z")

</div>

Yes that's what I'd try. I would expect you'll need to iterate, deleting and re-creating the indices, until you get everything as you want.

---

<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: [January 17, 2019, 3:33pm UTC](https://discuss.elastic.co/t/export-index-and-structure/161700/5 "2019-01-17T15:33:26Z")

</div>

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