# How to clone an index with all it's documents

**URL:** <https://discuss.elastic.co/t/how-to-clone-an-index-with-all-its-documents/20891>\
**Category:** Elasticsearch\
**Created:** [November 21, 2014, 3:53pm UTC](https://discuss.elastic.co/t/how-to-clone-an-index-with-all-its-documents/20891 "2014-11-21T15:53:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ori\_P](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@Ori\_P](https://discuss.elastic.co/u/Ori_P)\
**Post date:** [November 21, 2014, 3:53pm UTC](https://discuss.elastic.co/t/how-to-clone-an-index-with-all-its-documents/20891/1 "2014-11-21T15:53:31Z")

</div>

I'm looking for a way to clone an entire index with all it's documents into  
a new index with a different name. What is the fast/efficient/elegant way  
to do this?

Thanks 🙂

--  
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/c9e39709-35a9-4425-bdc0-031363cce28c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c9e39709-35a9-4425-bdc0-031363cce28c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [November 21, 2014, 5:13pm UTC](https://discuss.elastic.co/t/how-to-clone-an-index-with-all-its-documents/20891/2 "2014-11-21T17:13:25Z")

</div>

Snapshot and restore.

Best.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 21 nov. 2014 à 16:53, Ori P [shalti@gmail.com](mailto:shalti@gmail.com) a écrit :
> 
> I'm looking for a way to clone an entire index with all it's documents into a new index with a different name. What is the fast/efficient/elegant way to do this?
> 
> ## Thanks 🙂
> 
> 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/c9e39709-35a9-4425-bdc0-031363cce28c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c9e39709-35a9-4425-bdc0-031363cce28c%40googlegroups.com).  
> 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/C437F302-F289-4553-B546-76D6E7D3ACEA%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/C437F302-F289-4553-B546-76D6E7D3ACEA%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ajay\_Divakaran](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Ajay\_Divakaran](https://discuss.elastic.co/u/Ajay_Divakaran)\
**Post date:** [November 23, 2014, 9:12am UTC](https://discuss.elastic.co/t/how-to-clone-an-index-with-all-its-documents/20891/3 "2014-11-23T09:12:50Z")

</div>

I've created a simple script to do the same. Below is the Github url

> **[GitHub - ajaydivakaran/es-index-cloner: Clone one elastic search index to...](https://github.com/ajaydivakaran/es-index-cloner)**
>
> Clone one elastic search index to another. Contribute to ajaydivakaran/es-index-cloner development by creating an account on GitHub.

On Friday, November 21, 2014 9:23:31 PM UTC+5:30, Ori P wrote:

> I'm looking for a way to clone an entire index with all it's documents  
> into a new index with a different name. What is the fast/efficient/elegant  
> way to do this?
> 
> Thanks 🙂

--  
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/6ac7d34e-d74d-4a17-82a2-22d15a4ce00f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6ac7d34e-d74d-4a17-82a2-22d15a4ce00f%40googlegroups.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:48am UTC](https://discuss.elastic.co/t/how-to-clone-an-index-with-all-its-documents/20891/4 "2017-07-06T00:48:14Z")

</div>


