Spec-Zone.ru › Elasticsearch 8
›Elasticsearch Guide [8.17] ›REST APIs ›Snapshot lifecycle management APIs

Execute snapshot lifecycle policy API

New API reference

For the most up-to-date API details, refer to Snapshot lifecycle management APIs.

Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.

Request

PUT /_slm/policy/<snapshot-lifecycle-policy-id>/_execute

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 snapshot policy to immediately create a snapshot. The snapshot policy is normally applied according to its schedule, but you might want to manually execute a policy before performing an upgrade or other maintenance.

Path parameters

<policy-id>
(Required, string) ID of the snapshot lifecycle policy to execute.

Examples

To take an immediate snapshot according to the daily-snapshots policy:

POST /_slm/policy/daily-snapshots/_execute

If successful, this request returns the generated snapshot name:

{
  "snapshot_name": "daily-snap-2019.04.24-gwrqoo2xtea3q57vvg0uea"
}

The snapshot is taken in the background. You can use the snapshot APIs to monitor the status of the snapshot.

To see the status of a policy’s most recent snapshot, you can use the get snapshot lifecycle policy API.

© 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/8.17/slm-api-execute-lifecycle.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API