Describe the issue:
I have many snapshots created by ISM policy.
I want to automatically delete snapshots after 30 days.
however, in the ISM policy, there’s no snapshot auto retension function.
in Snapshot Policy, there is such function, but seems it only works with snapshots which were created by the Snapshot Policy.
I tried to set a Snapshot Policy with deletion section, but no create section, but not success.
yes, I know snapshot are taken incrementally.
but in ISM policy, I always create a new backing index of my DataStream, then take the snapshot to the backing index which already readOnly.
So there shall not any change to the backing_index anymore.
I only need to keep my container app logging snapshot for 14 days, then I plan to free the objectstorage space.
the ISM policy only helps me create the snapshot, and the SM policy seems cannot automatically delete the aged snapshot by below SM policy, but it doesn’t work.
{
"name": "snapshotretensionpolicy-test",
"description": "delete old snapshots",
"creation": {
"time_limit": "0s", // make this SM policy do not create any new snapshot
"schedule": {
"cron": {
"expression": "0 04 * * *",
"timezone": "UTC"
}
}
},
"deletion": {
"schedule": {
"cron": {
"expression": "* 15 * * *",
"timezone": "UTC"
}
},
"time_limit": "2h",
"condition": {
"max_age": "14d", // delete > 14 days snapshot
"max_count": 14, // do not keep more than 14 snapshots
"min_count": 1 // at least keep 1 snapshot
}
},
"snapshot_config": {
"indices": "*-logs-*-metrics",
"repository": "CCEE_EUNL1_S3_ISMPOLICY",
"date_format": "yyyy.MM.dd-HH:mm:ss.SSS", // 2025.03.27-09:55:13.409
"timezone": "UTC",
"ignore_unavailable": "true",
"include_global_state": "false",
"partial": "true"
},
"enabled": true
}