# Cross data centre backup and recovery

**URL:** <https://discuss.elastic.co/t/cross-data-centre-backup-and-recovery/11066>\
**Category:** Elasticsearch\
**Created:** [March 7, 2013, 11:27pm UTC](https://discuss.elastic.co/t/cross-data-centre-backup-and-recovery/11066 "2013-03-07T23:27:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edward\_Sargisson](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@Edward\_Sargisson](https://discuss.elastic.co/u/Edward_Sargisson)\
**Post date:** [March 7, 2013, 11:27pm UTC](https://discuss.elastic.co/t/cross-data-centre-backup-and-recovery/11066/1 "2013-03-07T23:27:42Z")

</div>

Hi,  
Can a separate cluster be completed recovered by using rsync to copy over  
the contents of the local data directories and using local Gateway?

Background:  
We're considering using ES as the sole database for some important log  
data. To provide the necessary protection we need to store the same data in  
two data centres. The incoming data is coming from Flume so we can tee and  
pipe it around as we like.

Doing this as a single cluster appears to be a bad idea because of the  
split brain problem. If the WAN link is broken then both sides will think  
that they are the primary.

For this reason, we've been thinking of running two clusters - one in each  
data centre and feeding them the same data.

A problem we're considering what happens if we switch over to the standby  
data centre and then want to switch back. Conceivably, we could transfer  
the local data directories over the network so that the other cluster is  
now mirrored and then startup from there.

Thoughts?

Many thanks in advance.

Cheers,  
Edward

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [March 8, 2013, 1:42pm UTC](https://discuss.elastic.co/t/cross-data-centre-backup-and-recovery/11066/2 "2013-03-08T13:42:04Z")

</div>

On Thu, 2013-03-07 at 15:27 -0800, Edward Sargisson wrote:

> Hi,  
> Can a separate cluster be completed recovered by using rsync to copy  
> over the contents of the local data directories and using local  
> Gateway?

Yes it can.

> Background:  
> We're considering using ES as the sole database for some important log  
> data. To provide the necessary protection we need to store the same  
> data in two data centres. The incoming data is coming from Flume so we  
> can tee and pipe it around as we like.
> 
> Doing this as a single cluster appears to be a bad idea because of the  
> split brain problem. If the WAN link is broken then both sides will  
> think that they are the primary.
> 
> For this reason, we've been thinking of running two clusters - one in  
> each data centre and feeding them the same data.

Makes sense.

> A problem we're considering what happens if we switch over to the  
> standby data centre and then want to switch back. Conceivably, we  
> could transfer the local data directories over the network so that the  
> other cluster is now mirrored and then startup from there.

Given that you won't be deleting documents, what about keeping them in  
sync with a simple query?

eg run a loop which queries all docs where timestamp \> $last\_run,  
(requesting the version numbers as well), and indexing those docs to the  
other cluster

that way it'll be easy to run a master-slave setup, and easy to switch  
direction

clint

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:47am UTC](https://discuss.elastic.co/t/cross-data-centre-backup-and-recovery/11066/3 "2017-07-06T02:47:33Z")

</div>


