# Local gateway backup coordination

**URL:** https://discuss.elastic.co/t/local-gateway-backup-coordination/8494
**Category:** Elasticsearch
**Created:** [July 23, 2012, 6:30pm UTC](https://discuss.elastic.co/t/local-gateway-backup-coordination/8494 "2012-07-23T18:30:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![James\_Bardin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_bardin/32/2536_2.png) [@James\_Bardin](https://discuss.elastic.co/u/James_Bardin)
#### Post date: [July 23, 2012, 6:30pm UTC](https://discuss.elastic.co/t/local-gateway-backup-coordination/8494/1 "2012-07-23T18:30:38Z")

</div>

Using the local gateway, and backing up the data directory seems to be an  
often recommended and easy solution, but is this feasible as a cluster  
grows (without a central coordinator)? Aren't there inherently going to be  
timing issues when flushing, or setting ' translog.disable\_flush: false'  
from each node across the cluster?

I'm not clear on whether it is possible to script this independently on  
each node, coordinating somehow within the semantics of the elasticsearch  
cluster (using a simple script such as this  
[https://gist.github.com/1074906](https://gist.github.com/1074906)), or should I start with a single system to  
direct the backups cluster-wide?

Also, this particular cluster isn't on AWS, otherwise I would probably use  
the S3 gateway.

Thanks  
-jim

---

<div class="post-metadata">

### Author: ![Karussell\_2](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@Karussell\_2](https://discuss.elastic.co/u/Karussell_2)
#### Post date: [November 6, 2012, 4:25pm UTC](https://discuss.elastic.co/t/local-gateway-backup-coordination/8494/2 "2012-11-06T16:25:24Z")

</div>

Just for the records as this message is a bit old ...  
I think you should definitely time the flush enable/disable calls when  
having multiple servers ALTHOUGH in some cases one copy is sufficient (e.g.  
2 servers and replica=1 for all indices).

But timing your calls can be done when calling rsync for every server \*\*

Hope this could help someone,  
Peter.

# the first times rsync can take a bit long - do not disable flusing

echo "(SERVER1) rsync from $FROM to $TO1"  
ssh $SERVER1 "rsync -a $FROM $TO1"

echo "(SERVER2) rsync from $FROM to $TO2"  
ssh $SERVER2 "rsync -a $FROM $TO2"

# now disable flushing and do one manual flushing

$SCRIPTS/es-flush-disable.sh true  
$SCRIPTS/es-flush.sh

echo "rsync both again ..."  
ssh $SERVER1 "rsync -a $FROM $TO1"  
ssh $SERVER2 "rsync -a $FROM $TO2"

$SCRIPTS/es-flush-disable.sh false

--

---

<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:05am UTC](https://discuss.elastic.co/t/local-gateway-backup-coordination/8494/3 "2017-07-06T03:05:57Z")

</div>


