Cancel restore snapshot

hello, i am doing automation tests on snapshot restore.
I wish I could stop a restoration that is underway.
When I execute the following command:
GET / _tasks / taskID
I have the return indicating the id and the action of my task:
"tasks": { "taskID": { "node": "Node1", "id": 427761143, "type": "transport", "action": "cluster: admin / snapshot / restore", "start_time_in_millis": 1585209521425, "running_time_in_nanos": 10418788830868 }

then when launching a cancellation:
POST / _tasks / taskID / _cancel
I have the following message:
"reason": "task [taskID] doesn't support cancellation
How to stop a restore without removing the snapshot?

You should be able to stop the restore by deleting the index that's being restored.

Thanks to respond to me

Unfortunately when i delete the index
delete /index-car
The index is deleted and it is not restored
However the other snapshot index continue their restoration

Yes, if you want to cancel the restoration of multiple indices you must delete them all.

Yes,
this means that I have to wait until the restoration of each index is done
and then I can delete the indexes

but I cannot use this recipe because I have too many data in the index

I don't think that's true, I think you can delete the index while it's being restored. There is no need to wait for it to be fully restored.

Yes the recipe works
You have to adapt a bit to recover the index being restored first and then delete it
I have these steps scripted
thank you

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.