# Backup procedure for ES nodes

**URL:** https://discuss.elastic.co/t/backup-procedure-for-es-nodes/12616
**Category:** Elasticsearch
**Created:** [July 2, 2013, 1:51pm UTC](https://discuss.elastic.co/t/backup-procedure-for-es-nodes/12616 "2013-07-02T13:51:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vijayprabhakar](https://avatars.discourse-cdn.com/v4/letter/v/df788c/32.png) [@vijayprabhakar](https://discuss.elastic.co/u/vijayprabhakar)
#### Post date: [July 2, 2013, 1:51pm UTC](https://discuss.elastic.co/t/backup-procedure-for-es-nodes/12616/1 "2013-07-02T13:51:19Z")

</div>

Hi Team

I need some backup policies for my environment.  
I am using 5 clusters with 3 nodes which is spread on 3 machines.  
I need to take backup of all indexes in a cluster.

So what i thinking is shall i copy and archive the "data" directory alone..is this correct ..?

Also its enough to take the backup from any one node for a cluster, Whether using that i can able to recover the cluster ..?

---

<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 10, 2013, 7:47am UTC](https://discuss.elastic.co/t/backup-procedure-for-es-nodes/12616/2 "2013-07-10T07:47:03Z")

</div>

Hello,

Before backing up your data directory, you need to disable flush, so you  
don't catch it during a flush and get an inconsistent state:

curl -XPUT "$ADDRESS/$INDEX\_NAME/\_settings" -d '{  
"index": {  
"translog.disable\_flush": true  
}}'

After your backup is done, you should enable flush back again.

You only need to do that one one node if that node contains a complete set  
of shards. For example, if you have 3 nodes, and all your indices have 2  
replicas, then it should work. If you have 0 or one replicas, it's best to  
backup all data directories.

Here are two scripts I've tested for backing up and restoring "old" indices  
containing logs, in case it gives any insight:

> <https://gist.github.com/radu-gheorghe/3180985>

I was also optimizing them, because they wouldn't change from that point  
on. I don't know it it makes sense for you or not.

Best regards,  
Radu

On Tue, Jul 2, 2013 at 4:51 PM, vijayprabhakar  
[vijayprabhakar.90@gmail.com](mailto:vijayprabhakar.90@gmail.com)wrote:

> Hi Team
> 
> I need some backup policies for my environment.  
> I am using 5 clusters with 3 nodes which is spread on 3 machines.  
> I need to take backup of all indexes in a cluster.
> 
> So what i thinking is shall i copy and archive the "data" directory  
> alone..is this correct ..?
> 
> Also its enough to take the backup from any one node for a cluster, Whether  
> using that i can able to recover the cluster ..?
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Backup-procedure-for-ES-nodes-tp4037374.html](http://elasticsearch-users.115913.n3.nabble.com/Backup-procedure-for-ES-nodes-tp4037374.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> 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:27am UTC](https://discuss.elastic.co/t/backup-procedure-for-es-nodes/12616/3 "2017-07-06T02:27:20Z")

</div>


