-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] SM to support deletion of snapshots created manually #867
Comments
Hi, |
Hi @bowenlan-amzn |
Hi @ikibo For my own learning, I have been trying to understand the code and where changes would be needed for this feature request.
But snapshots created externally (through REST APIs and not ISM), would not have this field. I believe this function could be modified for delete-only policies, to not look for metadata for policy-name.
Would request maintainers too for their inputs. |
@aggarwalShivani 1,2 I think we can introduce new field under 3 we can make the |
In my case, we create snapshots with ISM, and expect to do housekeeping with SM. |
@wilalalee Yes, so this feature would ideally allow both the use-cases:
|
Hi @ikibo, are you still working on this feature? |
Is your feature request related to a problem?
Snapshot Managment should allow creating an SM policy that only deletes snapshots created manually (not through SM policy).
Problem statement -
I create snapshots for opensearch to backup its data. These snapshots should be created on demand by a user when required (at random times) and not based on any cron schedule.
The name of the snapshot too is decided by the user and not known beforehand. The name is appended with the timestamp of snapshot creation.
As a housekeeping activity, in order to control the number of snapshots retained in the system, we want to automate deletion of old snapshots from the system. For ex. The user could trigger snapshots n number of times in a week, but we want to enable a cron that runs once everyday and deletes any snapshots older than 7days.
I do not want to use the snapshot management plugin to "create" snapshots, but only "delete" the snapshots.
However, on creating a policy like below, it failed due to missing configuration for creation.
What alternatives have you considered?
Elasticsearch-curator provides this feature and we have been using the same successfully. We now are trying to migrate to ISM plugin (in replacement of curator) and want to achieve similar use-case.
https://www.elastic.co/guide/en/elasticsearch/client/curator/current/delete_snapshots.html
What solution would you like?
For ex. If user creates snapshots by the name, os-snapshot-yyyy.mm.dd-HH:MM:SS (For ex. os-snapshot-2023.07.19-10:15:12, os-snapshot-2023.07.19-12:10:10 etc), there should be a provision to create a policy to only "delete" snapshots older than 7d that match the pattern os-snapshot-*
The text was updated successfully, but these errors were encountered: