# Before snapshot : is an operation "flush" needed?

**URL:** <https://forum.opensearch.org/t/before-snapshot-is-an-operation-flush-needed/28279>\
**Category:** OpenSearch\
**Created:** [September 8, 2026, 1:44pm UTC](https://forum.opensearch.org/t/before-snapshot-is-an-operation-flush-needed/28279 "2026-09-08T13:44:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmdevito](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dmdevito](https://forum.opensearch.org/u/dmdevito)\
**Post date:** [September 8, 2026, 1:44pm UTC](https://forum.opensearch.org/t/before-snapshot-is-an-operation-flush-needed/28279/1 "2026-09-08T13:44:59Z")

</div>

**Versions** : latest (non relevant)

**Describe the issue** : Before taking an index snapshot, I have data in the in-memory ingesting buffer (and the translog too).

Does taking a snapshot trigger a refresh and a flush of this in-memory data _before_ the snapshot actually takes place?

Or do I need to perform a “refresh” operation and a “flush” operation before taking the snapshot?

The goal: I want all data ingested up to time _t_ (whether on disk or still in memory) to be included in the upcoming snapshot.

Thanks.

**Configuration** : non relevant.

---

<div class="post-metadata">

**Author:** ![Yanlin](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/yanlin/32/10286_2.png) [@Yanlin](https://forum.opensearch.org/u/Yanlin)\
**Post date:** [September 10, 2026, 11:33am UTC](https://forum.opensearch.org/t/before-snapshot-is-an-operation-flush-needed/28279/2 "2026-09-10T11:33:42Z")

</div>

Hi @dmdevito,

For a regular snapshot, you do not need to manually run a flush or refresh beforehand.  
When OpenSearch takes a shard snapshot, it acquires the latest Lucene index commit with `flushFirst` enabled. The source code explicitly notes:  
`// we flush first to make sure we get the latest writes snapshotted`  
`https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/snapshots/SnapshotShardsService.java#L471`  
A manual refresh is also not required, as the snapshot is based on the Lucene commit, and the flush needed to acquire the latest commit is handled internally by the snapshot process.  
I also verified this in a lab by disabling automatic refresh, indexing a document, and creating a snapshot without manually running either refresh or flush. After deleting and restoring the index from the snapshot, the document was successfully restored.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![dmdevito](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dmdevito](https://forum.opensearch.org/u/dmdevito)\
**Post date:** [September 23, 2026, 12:19pm UTC](https://forum.opensearch.org/t/before-snapshot-is-an-operation-flush-needed/28279/3 "2026-09-23T12:19:36Z")

</div>

> [@Yanlin](#):
>
> I also verified this in a lab by disabling automatic refresh, indexing a document, and creating a snapshot without manually running either refresh or flush. After deleting and restoring the index from the snapshot, the document was successfully restored.

Hi @Yanlin

Thanks for your response and checking your side. At the same time (more or less), I came to the conclusion that it would be better to check myself with an OpenSearch instance. Of course, the result was the same.

Anyway, my additionnal point is that the behavior of OpenSearch snapshot should be part of the snapshot contract, and then, part of the documentation (and unfortunately, it’s not the case).  
Thanks for all  
Dominique
