Execute snapshot retention policy API
Deletes any snapshots that are expired according to the policy’s retention rules.
Request
POST /_slm/_execute_retention
Prerequisites
If the Elasticsearch security features are enabled, you must have the manage_slm cluster privilege to use this API. For more information, see Security privileges.
Description
Manually applies the retention policy to force immediate removal of expired snapshots. The retention policy is normally applied according to its schedule.
Examples
To force removal of expired snapshots:
POST /_slm/_execute_retention
Retention runs asynchronously in the background.
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/slm-api-execute-retention.html