Can't restore snapshot

Hello Everyone, I am trying to restore my snapshot, and this error appeared:

cannot restore index [.transform-notifications] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name"

So, I used this command to closed the open index.

curl -u user:password123 -XPOST https://localhost:9201/_cluster/.transform-notifcations/_close

don't know if there is something wrong with my command coz' I'm having this kind of error:

{"error":{"root_cause":[{"type":"parse_exception","reason":"request body is required"}],"type":"parse_exception","reason":"request body is required"},"status":400}

Thanks for your future response :slight_smile:

Hi @wonderland14

This post teaches 3 ways to solve this problem.

may u help me on this one? I tried everything but still not getting the right command to delete or close the hidden index transform-notifications :frowning:

look this example to rename the index-name

POST /_snapshot/my_repository/snapshot_2/_restore?wait_for_completion=true
  "indices": "index_1,index_2",
  "ignore_unavailable": true,
  "include_global_state": false,
  "rename_pattern": "index_(.+)",
  "rename_replacement": "restored_index_$1",
  "include_aliases": false

The following request restores index_1 and index_2 from snapshot_2. The rename_pattern and rename_replacement parameters indicate any index matching the regular expression index_(.+) will be renamed using the pattern restored_index_$1 when restored.

For example, index_1 will be renamed to restored_index_1. index_2 will be renamed to restored_index_2.

We followed the guide how restore entire cluster and we were able to, but first we needed to remove an index lifecycle policy.

Thanks for the help/guide, cluster has been completely restored!

1 Like