Skip to content
Advertisement

How do I verify that the snapshot is ongoing for a particular index in elastic search?

I have a business need to drop and re-create indices with new mappings. I have been doing that successfully until I encountered the following problem:

Cannot delete indices that are being snapshotted. Try again after snapshot finishes or cancel the currently running snapshot.

  1. How do I check if the snapshot is ongoing?
  2. How do I cancel the currently running snapshot?

Is there a Java API for it? I am using version 6.01.

Advertisement

Answer

  1. Get all running snapshots using GET /_snapshot/_status

  2. Deletion of a running snapshot will stop and then delete the snapshot: DELETE /_snapshot/my_repository/snapshot_to_stop

Source: snapshot api

There is no offical java api supporting rhe snapshot and restore module but you can easily issue a http call using the official http rest client

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement