# Backup Policies for ES

**URL:** https://discuss.elastic.co/t/backup-policies-for-es/12642
**Category:** Elasticsearch
**Created:** [July 3, 2013, 1:26pm UTC](https://discuss.elastic.co/t/backup-policies-for-es/12642 "2013-07-03T13:26:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Vijay\_Prabhakar](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@Vijay\_Prabhakar](https://discuss.elastic.co/u/Vijay_Prabhakar)
#### Post date: [July 3, 2013, 1:26pm UTC](https://discuss.elastic.co/t/backup-policies-for-es/12642/1 "2013-07-03T13:26:17Z")

</div>

Hi Team,

I am trying to follow this backup script

> <https://gist.github.com/karussell/1074906>
>
> There are more than three files. show original

I have some few questions regarding this

1. We are using 5 clusters and each cluster having 3 nodes.
2. whether i need to rsync the "data" directory alone . is it enough to  
take backup from any one of the node for each cluster. Also can i recover  
the cluster using  
that data directory when some data crashes occur..?
3. In the above script they disabling flush to stop indexing data's/records  
to that node(Am i right ..?) What happens if any data's indexed at that  
time..?

--  
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: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [July 3, 2013, 2:25pm UTC](https://discuss.elastic.co/t/backup-policies-for-es/12642/2 "2013-07-03T14:25:39Z")

</div>

Hello Vijay,

On Wed, Jul 3, 2013 at 4:26 PM, Vijay Prabhakar [vsubbaraj@sirahu.com](mailto:vsubbaraj@sirahu.com)wrote:

> Hi Team,
> 
> I am trying to follow this backup script [https://gist.github.com/](https://gist.github.com/)\*\*  
> karussell/1074906 [https://gist.github.com/karussell/1074906](https://gist.github.com/karussell/1074906)
> 
> I have some few questions regarding this
> 
> 1. We are using 5 clusters and each cluster having 3 nodes.
> 2. whether i need to rsync the "data" directory alone . is it enough to  
> take backup from any one of the node for each cluster. Also can i recover  
> the cluster using  
> that data directory when some data crashes occur..?

Yes, although to be on the safe side, to do that I'd shut down all 3 nodes,  
recover all 3 backups and restart the nodes. It's nice to have your data  
consistent though the cluster.

> 1. In the above script they disabling flush to stop indexing  
> data's/records to that node(Am i right ..?) What happens if any data's  
> indexed at that time..?

No, indexing still works. Just flushing those indexed docs to disk is  
temporarily suspended. Normally, indexing happens in memory, which is very  
fast, then every once in a while those changes are flushed to the actual  
Lucene index, on disk, according to your transaction log  
[http://www.elasticsearch.org/guide/reference/index-modules/translog/](http://www.elasticsearch.org/guide/reference/index-modules/translog/)  
settings.

When you disable flushing, this writing to disk doesn't happen until you  
enable flushing again. I guess if a lot of indexing happens while you back  
up, you can run out of memory. But I never heard anyone complaining about  
that. It should depend on how much indexing usually happens, and how much  
memory you have.

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--  
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: ![Vijay\_Prabhakar](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@Vijay\_Prabhakar](https://discuss.elastic.co/u/Vijay_Prabhakar)
#### Post date: [July 4, 2013, 6:52am UTC](https://discuss.elastic.co/t/backup-policies-for-es/12642/3 "2013-07-04T06:52:44Z")

</div>

Hi Radu,

Thanks for your info.

Regarding backup, we are using 3 nodes(2 nodes as replicas).  
So its enough to take backup from any one of the node right ..?

index.number\_of\_shards: 1  
index.number\_of\_replicas: 2

Thanks,  
Vijay Prabhakar.

On Wednesday, July 3, 2013 7:55:39 PM UTC+5:30, Radu Gheorghe wrote:

> Hello Vijay,
> 
> On Wed, Jul 3, 2013 at 4:26 PM, Vijay Prabhakar \<[vsub...@sirahu.com](mailto:vsub...@sirahu.com)\<javascript:\>
> 
> > wrote:
> 
> > Hi Team,
> > 
> > I am trying to follow this backup script [https://gist.github.com/](https://gist.github.com/)\*\*  
> > karussell/1074906 [https://gist.github.com/karussell/1074906](https://gist.github.com/karussell/1074906)
> > 
> > I have some few questions regarding this
> > 
> > 1. We are using 5 clusters and each cluster having 3 nodes.
> > 2. whether i need to rsync the "data" directory alone . is it enough to  
> > take backup from any one of the node for each cluster. Also can i recover  
> > the cluster using  
> > that data directory when some data crashes occur..?
> 
> Yes, although to be on the safe side, to do that I'd shut down all 3  
> nodes, recover all 3 backups and restart the nodes. It's nice to have your  
> data consistent though the cluster.
> 
> > 1. In the above script they disabling flush to stop indexing  
> > data's/records to that node(Am i right ..?) What happens if any data's  
> > indexed at that time..?
> 
> No, indexing still works. Just flushing those indexed docs to disk is  
> temporarily suspended. Normally, indexing happens in memory, which is very  
> fast, then every once in a while those changes are flushed to the actual  
> Lucene index, on disk, according to your transaction log  
> [http://www.elasticsearch.org/guide/reference/index-modules/translog/](http://www.elasticsearch.org/guide/reference/index-modules/translog/)  
> settings.
> 
> When you disable flushing, this writing to disk doesn't happen until you  
> enable flushing again. I guess if a lot of indexing happens while you back  
> up, you can run out of memory. But I never heard anyone complaining about  
> that. It should depend on how much indexing usually happens, and how much  
> memory you have.
> 
> ## Best regards, Radu
> 
> [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--  
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: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [July 4, 2013, 6:57am UTC](https://discuss.elastic.co/t/backup-policies-for-es/12642/4 "2013-07-04T06:57:13Z")

</div>

Hello Vijay,

Yes, that should be enough, but I'd test the whole backup&recovery process  
before relying on it 🙂

On Thu, Jul 4, 2013 at 9:52 AM, Vijay Prabhakar [vsubbaraj@sirahu.com](mailto:vsubbaraj@sirahu.com)wrote:

> Hi Radu,
> 
> Thanks for your info.
> 
> Regarding backup, we are using 3 nodes(2 nodes as replicas).  
> So its enough to take backup from any one of the node right ..?
> 
> index.number\_of\_shards: 1  
> index.number\_of\_replicas: 2
> 
> Thanks,  
> Vijay Prabhakar.
> 
> On Wednesday, July 3, 2013 7:55:39 PM UTC+5:30, Radu Gheorghe wrote:
> 
> > Hello Vijay,
> > 
> > On Wed, Jul 3, 2013 at 4:26 PM, Vijay Prabhakar [vsub...@sirahu.com](mailto:vsub...@sirahu.com)wrote:
> > 
> > > Hi Team,
> > > 
> > > I am trying to follow this backup script [https://gist.github](https://gist.github). **com/**  
> > > karussell/1074906 [https://gist.github.com/karussell/1074906](https://gist.github.com/karussell/1074906)
> > > 
> > > I have some few questions regarding this
> > > 
> > > 1. We are using 5 clusters and each cluster having 3 nodes.
> > > 2. whether i need to rsync the "data" directory alone . is it enough to  
> > > take backup from any one of the node for each cluster. Also can i recover  
> > > the cluster using  
> > > that data directory when some data crashes occur..?
> > 
> > Yes, although to be on the safe side, to do that I'd shut down all 3  
> > nodes, recover all 3 backups and restart the nodes. It's nice to have your  
> > data consistent though the cluster.
> > 
> > > 1. In the above script they disabling flush to stop indexing  
> > > data's/records to that node(Am i right ..?) What happens if any data's  
> > > indexed at that time..?
> > 
> > No, indexing still works. Just flushing those indexed docs to disk is  
> > temporarily suspended. Normally, indexing happens in memory, which is very  
> > fast, then every once in a while those changes are flushed to the actual  
> > Lucene index, on disk, according to your transaction log  
> > [http://www.elasticsearch.org/guide/reference/index-modules/translog/](http://www.elasticsearch.org/guide/reference/index-modules/translog/)  
> > settings.
> > 
> > When you disable flushing, this writing to disk doesn't happen until you  
> > enable flushing again. I guess if a lot of indexing happens while you back  
> > up, you can run out of memory. But I never heard anyone complaining about  
> > that. It should depend on how much indexing usually happens, and how much  
> > memory you have.
> > 
> > ## Best regards, Radu
> > 
> > [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> --  
> 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).

--  
[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--  
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:28am UTC](https://discuss.elastic.co/t/backup-policies-for-es/12642/5 "2017-07-06T02:28:15Z")

</div>


