I was trying to backup and restore ES to new cluster using below commands.
//take snapshot
curl -u backup:$password -s -XPUT ${endpoint}
//restore
curl -s -u backup:$password -X POST "${HOSTNAME}:${PORT}/_snapshot/${BACKUP}/$SNAPSHOT/_restore?wait_for_completion=true&pretty" -H 'Content-Type: application/json' -d' {
"indices": "*",
"include_global_state": true}
'
Restore is failing with below error in 8.17. which worked in 8.15.
failed to restore snapshot
org.elasticsearch.snapshots.SnapshotRestoreException: [my_restore_backup:snapshot-es-estestwithoutsvc-nh3rfy-0/OOBj_xvpRE2JvkhJGm9SXg] cannot restore index [.ds-.logs-deprecation.elasticsearch-default-2025.01.21-000001] 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