How snapshot work and maintain?

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
AWS Opensearch 7.4

Describe the issue:

I’d like to take manual snapshots and keep only the five most recent ones to prevent excessive storage growth. I understand that snapshots are incremental, but I’m curious about how the snapshot lifecycle works.

Scenario

  • Index A with document 1
  • Take snapshot 1
  • Index A with document 1 and 2
  • Take snapshot 2
  • Index A with document 1,2 and 3
  • Take snapshot 3
  • and so on

I want to maintain a manageable number of snapshots, keeping only the five most recent ones. If I delete snapshot 1 and then restore snapshot 3 to the cluster, will document 1 be missing from the restored snapshot 3 because of incremental snapshot?

Does this mean that deleting older snapshots to manage storage can compromise the ability to fully restore the index?

Tested from my end

In summary, if I delete all snapshots except the latest one, I can still restore all documents, including the oldest ones, by restoring with the latest snapshot.

2 Likes