# Duplicate an elasticsearch cluster

**URL:** <https://discuss.elastic.co/t/duplicate-an-elasticsearch-cluster/7934>\
**Category:** Elasticsearch\
**Created:** [May 31, 2012, 7:47pm UTC](https://discuss.elastic.co/t/duplicate-an-elasticsearch-cluster/7934 "2012-05-31T19:47:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Welson\_Wong](https://avatars.discourse-cdn.com/v4/letter/w/edb3f5/32.png) [@Welson\_Wong](https://discuss.elastic.co/u/Welson_Wong)\
**Post date:** [May 31, 2012, 7:47pm UTC](https://discuss.elastic.co/t/duplicate-an-elasticsearch-cluster/7934/1 "2012-05-31T19:47:11Z")

</div>

I just started to use elasticsearch and created a small cluster (2  
machines) filled with some index data. So far everything works well.

Now I have to duplicate the cluster on another two machines and  
hopefully I do not have to index everything again.

I did one-to-one copying for the data directory from the old cluster  
to the new cluster. After I restarted the cluster, my client code (in  
pyes) shows error "IndexMissingException: [test-profile] missing",  
where "test-profile" is the index name.

Since the data directory contains mata info, I thought restarting the  
cluster with copied data should automatically work. Now it seems not  
the case. Could someone point out what could be the potential problem  
here?

Thanks.

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick/32/1437_2.png) [@Patrick](https://discuss.elastic.co/u/Patrick)\
**Post date:** [May 31, 2012, 7:54pm UTC](https://discuss.elastic.co/t/duplicate-an-elasticsearch-cluster/7934/2 "2012-05-31T19:54:26Z")

</div>

Hey!

Are you using any gateways? I believe you can copy the gateway data to a  
new cluster, and that should restore it, you'd have to confirm this though,  
as I've never done it myself.

## Patrick

> **[Patrick Ancillotti on about.me](https://about.me/patrick.ancillotti)**
>
> I live in New York.

patrick eefy net

On Thu, May 31, 2012 at 1:47 PM, aw [airwaywong@gmail.com](mailto:airwaywong@gmail.com) wrote:

> I just started to use elasticsearch and created a small cluster (2  
> machines) filled with some index data. So far everything works well.
> 
> Now I have to duplicate the cluster on another two machines and  
> hopefully I do not have to index everything again.
> 
> I did one-to-one copying for the data directory from the old cluster  
> to the new cluster. After I restarted the cluster, my client code (in  
> pyes) shows error "IndexMissingException: [test-profile] missing",  
> where "test-profile" is the index name.
> 
> Since the data directory contains mata info, I thought restarting the  
> cluster with copied data should automatically work. Now it seems not  
> the case. Could someone point out what could be the potential problem  
> here?
> 
> Thanks.

---

<div class="post-metadata">

**Author:** ![Welson\_Wong](https://avatars.discourse-cdn.com/v4/letter/w/edb3f5/32.png) [@Welson\_Wong](https://discuss.elastic.co/u/Welson_Wong)\
**Post date:** [May 31, 2012, 8:12pm UTC](https://discuss.elastic.co/t/duplicate-an-elasticsearch-cluster/7934/3 "2012-05-31T20:12:05Z")

</div>

Thanks for the hint.

Actually I am not sure if I am using any gateways or not. I just use  
the default setup and I don't remember I have ever set any gateway. If  
I don't have gateway, is there some way to copy and load the data to  
another cluster?

On May 31, 12:54 pm, Patrick [patr...@eefy.net](mailto:patr...@eefy.net) wrote:

> Hey!
> 
> Are you using any gateways? I believe you can copy the gateway data to a  
> new cluster, and that should restore it, you'd have to confirm this though,  
> as I've never done it myself.
> 
> Patrick  
> ----------------------------------------[Patrick Ancillotti - New York | about.me](http://about.me/patrick.ancillotti)  
> patrick eefy net
> 
> On Thu, May 31, 2012 at 1:47 PM, aw [airwayw...@gmail.com](mailto:airwayw...@gmail.com) wrote:
> 
> > I just started to use elasticsearch and created a small cluster (2  
> > machines) filled with some index data. So far everything works well.
> 
> > Now I have to duplicate the cluster on another two machines and  
> > hopefully I do not have to index everything again.
> 
> > I did one-to-one copying for the data directory from the old cluster  
> > to the new cluster. After I restarted the cluster, my client code (in  
> > pyes) shows error "IndexMissingException: [test-profile] missing",  
> > where "test-profile" is the index name.
> 
> > Since the data directory contains mata info, I thought restarting the  
> > cluster with copied data should automatically work. Now it seems not  
> > the case. Could someone point out what could be the potential problem  
> > here?
> 
> > Thanks.

---

<div class="post-metadata">

**Author:** ![Patrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick/32/1437_2.png) [@Patrick](https://discuss.elastic.co/u/Patrick)\
**Post date:** [June 1, 2012, 4:27pm UTC](https://discuss.elastic.co/t/duplicate-an-elasticsearch-cluster/7934/4 "2012-06-01T16:27:10Z")

</div>

Hey,

Once you setup the local gateway, you can take that directory, copy it to  
the new cluster, and then setup the same configuration to load the data  
(it'll automatically load data it finds in the gateway location)

## Patrick

> **[Patrick Ancillotti on about.me](https://about.me/patrick.ancillotti)**
>
> I live in New York.

patrick eefy net

On Thu, May 31, 2012 at 2:12 PM, aw [airwaywong@gmail.com](mailto:airwaywong@gmail.com) wrote:

> Thanks for the hint.
> 
> Actually I am not sure if I am using any gateways or not. I just use  
> the default setup and I don't remember I have ever set any gateway. If  
> I don't have gateway, is there some way to copy and load the data to  
> another cluster?
> 
> On May 31, 12:54 pm, Patrick [patr...@eefy.net](mailto:patr...@eefy.net) wrote:
> 
> > Hey!
> > 
> > Are you using any gateways? I believe you can copy the gateway data to a  
> > new cluster, and that should restore it, you'd have to confirm this  
> > though,  
> > as I've never done it myself.
> > 
> > ## Patrick
> 
> [Patrick Ancillotti - New York | about.me](http://about.me/patrick.ancillotti)
> 
> > patrick eefy net
> > 
> > On Thu, May 31, 2012 at 1:47 PM, aw [airwayw...@gmail.com](mailto:airwayw...@gmail.com) wrote:
> > 
> > > I just started to use elasticsearch and created a small cluster (2  
> > > machines) filled with some index data. So far everything works well.
> > 
> > > Now I have to duplicate the cluster on another two machines and  
> > > hopefully I do not have to index everything again.
> > 
> > > I did one-to-one copying for the data directory from the old cluster  
> > > to the new cluster. After I restarted the cluster, my client code (in  
> > > pyes) shows error "IndexMissingException: [test-profile] missing",  
> > > where "test-profile" is the index name.
> > 
> > > Since the data directory contains mata info, I thought restarting the  
> > > cluster with copied data should automatically work. Now it seems not  
> > > the case. Could someone point out what could be the potential problem  
> > > here?
> > 
> > > Thanks.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 7, 2012, 11:15am UTC](https://discuss.elastic.co/t/duplicate-an-elasticsearch-cluster/7934/5 "2012-06-07T11:15:54Z")

</div>

Using the local gateway (the default one) means that you can simply copy  
over the data location. If the two clusters have a different cluster name,  
make sure to rename the first directory under the data location to the  
updated cluster name.

On Thu, May 31, 2012 at 9:47 PM, aw [airwaywong@gmail.com](mailto:airwaywong@gmail.com) wrote:

> I just started to use elasticsearch and created a small cluster (2  
> machines) filled with some index data. So far everything works well.
> 
> Now I have to duplicate the cluster on another two machines and  
> hopefully I do not have to index everything again.
> 
> I did one-to-one copying for the data directory from the old cluster  
> to the new cluster. After I restarted the cluster, my client code (in  
> pyes) shows error "IndexMissingException: [test-profile] missing",  
> where "test-profile" is the index name.
> 
> Since the data directory contains mata info, I thought restarting the  
> cluster with copied data should automatically work. Now it seems not  
> the case. Could someone point out what could be the potential problem  
> here?
> 
> Thanks.

---

<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, 3:25am UTC](https://discuss.elastic.co/t/duplicate-an-elasticsearch-cluster/7934/6 "2017-07-06T03:25:23Z")

</div>


