Snapshot management plugin allows deleting snapshots not created by the policy?

Describe the issue:
Background -

  • I currently use elasticsearch-curator with Opensearch to delete older indices and snapshots.
  • I am now intending to move away from curator to Index State Management (for indices) and Snapshot Management plugin (for snapshots).
  • In my use-case, snapshots are created manually (using /_snapshot REST APIs) on user-trigger (at random times) and the snapshot names follow a particular date-format.
  • The requirement is the snapshot deletion/cleanup should be scheduled periodically.

Query -
As per the plugin documentation, the snapshot management policy mandatorily requires creation section.

Parameter | Type | Description
creation | Object | Configuration for snapshot creation. Required.

Can we use this plugin to only schedule deletion of snapshots and not creation?
Does it support deletion of snapshots that are not created by this policy?

Any recommendations on how to achieve this?

Hi @shivani, looking at your request, I think you will find the deletion.delete_condition.max_age, deletion.time_limit, and/or deletion.schedule fields valuable. If you look at the plugin documentation you linked, you can find information about settings these fields there.

Thanks @scrawfor, it does explain deletion parameters. But my query is can the creation field be set as null?

creation | Object | Configuration for snapshot creation. Required.

I do not intend to create snapshots through the plugin, just delete existing snapshots by setting deletion.* parameters.


Update - 21-07-2023 !
Unable to reply to the thread as its automatically closed, so editing this comment to give an update for anyone interested in this topic –
I tried hands-on with the plugin and as expected, SM policy fails to get created if it does not define creation parameters.

I have raised a feature request for the same

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