Clean up the snapshot repository Added in 7.4.0

POST /_snapshot/{repository}/_cleanup

Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.

Path parameters

  • repository string Required

    Snapshot repository to clean up.

Query parameters

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • results object Required

      Additional properties are allowed.

      Hide results attributes Show results attributes object
      • deleted_blobs number Required

        Number of binary large objects (blobs) removed during cleanup.

      • deleted_bytes number Required

        Number of bytes freed by cleanup operations.

POST /_snapshot/{repository}/_cleanup
curl \
 -X POST http://api.example.com/_snapshot/{repository}/_cleanup
Response examples (200)
{
  "results": {
    "deleted_blobs": 42.0,
    "deleted_bytes": 42.0
  }
}