Is it possible to know when no more changes will be included in a snapshot?

To create a backup that's consistent across my index and other application data I create a snapshot when there's no changes being made to the index.

I want to start making changes to the index as soon as possible after the snapshot has stopped including changes.

I assume that if I use the create snapshot API's wait_for_completion=true it's safe to resume changing the index once the API returns.

If I use wait_for_completion=false is it possible to know when create snapshot process has got the the stage when no further changes will be included in the snapshot ?

There's a couple of statements in the doc (V7.x) but it's not clear if it's possible to determine when it's safe to start making changes and not have them be included in the snapshot. I can see this topic is discussed in a couple of places in the docs but I can't seem to find a definitive answer to my question.

In the create snapshot considerations section:

  • Taking a snapshot doesn’t block indexing or other requests. However, the snapshot won’t include changes made after the snapshot process starts.

In the guide's snapshot and restore page snapshot start and stop times section

A snapshot doesn’t represent a cluster at a precise point in time. Instead, each snapshot includes a start and end time. The snapshot represents a view of each shard’s data at some point between these two times.

This is the definitive answer: it's not really possible to pin it down any more precisely than that. But see #86617 for a related feature request.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.