# Configuring periodic snapshotting?

**URL:** <https://discuss.elastic.co/t/configuring-periodic-snapshotting/4751>\
**Category:** Elasticsearch\
**Created:** [July 1, 2011, 9:00pm UTC](https://discuss.elastic.co/t/configuring-periodic-snapshotting/4751 "2011-07-01T21:00:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Lambert](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@Alex\_Lambert](https://discuss.elastic.co/u/Alex_Lambert)\
**Post date:** [July 1, 2011, 9:00pm UTC](https://discuss.elastic.co/t/configuring-periodic-snapshotting/4751/1 "2011-07-01T21:00:50Z")

</div>

Hi folks,

elasticsearch/modules/elasticsearch/src/main/java/org/elasticsearch/  
action/admin/indices/gateway/snapshot/GatewaySnapshotRequest.java  
says:

- Gateway snapshot allows to explicitly perform a snapshot through  
the gateway of one or more indices (backup them).
- By default, each index gateway periodically snapshot changes,  
though it can be disabled and be controlled completely
- through this API. Best created using {@link  
org.elasticsearch.client.Requests#gatewaySnapshotRequest(String...)}.

I'd like to learn more about this, I wasn't able to find any code or  
configuration knobs for the periodic snapshot feature. I understand  
that this may not be documented yet; if it isn't, where should I look  
for the code?

Thanks for your help!

Best,  
Alex

---

<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:** [July 1, 2011, 9:04pm UTC](https://discuss.elastic.co/t/configuring-periodic-snapshotting/4751/2 "2011-07-01T21:04:33Z")

</div>

Hi Alex

> elasticsearch/modules/elasticsearch/src/main/java/org/elasticsearch/  
> action/admin/indices/gateway/snapshot/GatewaySnapshotRequest.java  
> says:
> 
> - Gateway snapshot allows to explicitly perform a snapshot through  
> the gateway of one or more indices (backup them).
> - By default, each index gateway periodically snapshot changes,  
> though it can be disabled and be controlled completely
> - through this API. Best created using {@link  
> org.elasticsearch.client.Requests#gatewaySnapshotRequest(String...)}.
> 
> I'd like to learn more about this, I wasn't able to find any code or  
> configuration knobs for the periodic snapshot feature. I understand  
> that this may not be documented yet; if it isn't, where should I look  
> for the code?

First of all, why do you not want to use the local (default) gateway? It  
performs best.

Second, snapshotting in the shared gateway happens automatically, you  
don't need to think about it.

If you want to back up a data dir, you should just be able to copy or  
rsync it. To be sure that no segments have merged in the meantime, you  
can just run a second rsync on it, which should be much faster.

clint

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [July 2, 2011, 8:27pm UTC](https://discuss.elastic.co/t/configuring-periodic-snapshotting/4751/3 "2011-07-02T20:27:58Z")

</div>

On Jul 1, 11:04 pm, Clinton Gormley [clin...@iannounce.co.uk](mailto:clin...@iannounce.co.uk) wrote:

> Hi Alex
> 
> > elasticsearch/modules/elasticsearch/src/main/java/org/elasticsearch/  
> > action/admin/indices/gateway/snapshot/GatewaySnapshotRequest.java  
> > says:
> 
> > - Gateway snapshot allows to explicitly perform a snapshot through  
> > the gateway of one or more indices (backup them).
> > - By default, each index gateway periodically snapshot changes,  
> > though it can be disabled and be controlled completely
> > - through this API. Best created using {@link  
> > org.elasticsearch.client.Requests#gatewaySnapshotRequest(String...)}.
> 
> > I'd like to learn more about this, I wasn't able to find any code or  
> > configuration knobs for the periodic snapshot feature. I understand  
> > that this may not be documented yet; if it isn't, where should I look  
> > for the code?
> 
> First of all, why do you not want to use the local (default) gateway? It  
> performs best.
> 
> Second, snapshotting in the shared gateway happens automatically, you  
> don't need to think about it.
> 
> If you want to back up a data dir, you should just be able to copy or  
> rsync it. To be sure that no segments have merged in the meantime, you  
> can just run a second rsync on it, which should be much faster.

There is also an API where you can disable flushes + enable it when  
you are done:

index.translog.disable\_flush

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

---

<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:** [July 2, 2011, 8:32pm UTC](https://discuss.elastic.co/t/configuring-periodic-snapshotting/4751/4 "2011-07-02T20:32:12Z")

</div>

Hi,

Let me explain. Using the local gateway (the default one) there is no meaning for snapshotting, since the data is persisted on each node, and restored (on cluster restart) from the different nodes local data location.

Snapshotting is there for the shared gateway option. Its the process of getting the local data and persisting it (delta wise) to the shared storage. It works by default in a scheduled manner, but, the gateway snapshot API is there to explicitly invoke it.

As for wheat Karussell suggested. Its a mean to backup in case you are using the local gateway. Where you can disable translog flushing, make a copy of each node data location, and then resume it.

-shay.banon

On Saturday, July 2, 2011 at 11:27 PM, Karussell wrote:

> On Jul 1, 11:04 pm, Clinton Gormley \<[clin...@iannounce.co.uk](mailto:clin...@iannounce.co.uk) ([http://iannounce.co.uk](http://iannounce.co.uk))\> wrote:
> 
> > Hi Alex
> > 
> > > elasticsearch/modules/elasticsearch/src/main/java/org/elasticsearch/  
> > > action/admin/indices/gateway/snapshot/GatewaySnapshotRequest.java  
> > > says:
> > 
> > > - Gateway snapshot allows to explicitly perform a snapshot through  
> > > the gateway of one or more indices (backup them).
> > > - By default, each index gateway periodically snapshot changes,  
> > > though it can be disabled and be controlled completely
> > > - through this API. Best created using {@link  
> > > org.elasticsearch.client.Requests#gatewaySnapshotRequest(String...)}.
> > 
> > > I'd like to learn more about this, I wasn't able to find any code or  
> > > configuration knobs for the periodic snapshot feature. I understand  
> > > that this may not be documented yet; if it isn't, where should I look  
> > > for the code?
> > 
> > First of all, why do you not want to use the local (default) gateway? It  
> > performs best.
> > 
> > Second, snapshotting in the shared gateway happens automatically, you  
> > don't need to think about it.
> > 
> > If you want to back up a data dir, you should just be able to copy or  
> > rsync it. To be sure that no segments have merged in the meantime, you  
> > can just run a second rsync on it, which should be much faster.
> 
> There is also an API where you can disable flushes + enable it when  
> you are done:
> 
> index.translog.disable\_flush
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings.html)

---

<div class="post-metadata">

**Author:** ![Alex\_Lambert](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@Alex\_Lambert](https://discuss.elastic.co/u/Alex_Lambert)\
**Post date:** [July 5, 2011, 2:18pm UTC](https://discuss.elastic.co/t/configuring-periodic-snapshotting/4751/5 "2011-07-05T14:18:19Z")

</div>

Great, that makes sense. Thank you all for your help -- much appreciated!

Best,  
Alex

On Sat, Jul 2, 2011 at 4:32 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:

> Hi,  
> Let me explain. Using the local gateway (the default one) there is no  
> meaning for snapshotting, since the data is persisted on each node, and  
> restored (on cluster restart) from the different nodes local data location.  
> Snapshotting is there for the shared gateway option. Its the process of  
> getting the local data and persisting it (delta wise) to the shared storage.  
> It works by default in a scheduled manner, but, the gateway snapshot API is  
> there to explicitly invoke it.  
> As for wheat Karussell suggested. Its a mean to backup in case you are  
> using the local gateway. Where you can disable translog flushing, make a  
> copy of each node data location, and then resume it.  
> -shay.banon
> 
> On Saturday, July 2, 2011 at 11:27 PM, Karussell wrote:
> 
> On Jul 1, 11:04 pm, Clinton Gormley [clin...@iannounce.co.uk](mailto:clin...@iannounce.co.uk) wrote:
> 
> Hi Alex
> 
> elasticsearch/modules/elasticsearch/src/main/java/org/elasticsearch/  
> action/admin/indices/gateway/snapshot/GatewaySnapshotRequest.java  
> says:
> 
> - Gateway snapshot allows to explicitly perform a snapshot through  
> the gateway of one or more indices (backup them).
> - By default, each index gateway periodically snapshot changes,  
> though it can be disabled and be controlled completely
> - through this API. Best created using {@link  
> org.elasticsearch.client.Requests#gatewaySnapshotRequest(String...)}.
> 
> I'd like to learn more about this, I wasn't able to find any code or  
> configuration knobs for the periodic snapshot feature. I understand  
> that this may not be documented yet; if it isn't, where should I look  
> for the code?
> 
> First of all, why do you not want to use the local (default) gateway? It  
> performs best.
> 
> Second, snapshotting in the shared gateway happens automatically, you  
> don't need to think about it.
> 
> If you want to back up a data dir, you should just be able to copy or  
> rsync it. To be sure that no segments have merged in the meantime, you  
> can just run a second rsync on it, which should be much faster.
> 
> There is also an API where you can disable flushes + enable it when  
> you are done:
> 
> index.translog.disable\_flush
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings.html)

---

<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, 4:01am UTC](https://discuss.elastic.co/t/configuring-periodic-snapshotting/4751/6 "2017-07-06T04:01:43Z")

</div>


