Elasticsearch restoring got conflicts with the internal system indices

We are trying to restore a snapshot made previously, using the following command:

POST /_snapshot/my_backup/my_snapshot_2023.06.30/_restore

However, the command keeps getting errors saying ... index [.xxxxxx] because an open index with same name already exists in the cluster. .... The index name .xxxxxx indicates an internal system index.

{
  "error": {
    "root_cause": [
      {
        "type": "snapshot_restore_exception",
        "reason": "[my_backup:my_snapshot_2023.06.30/Pl0QeAojSgq1p6PYI_JdDg] cannot restore index [.ds-ilm-history-5-2023.02.17-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"
      }
    ],
    "type": "snapshot_restore_exception",
    "reason": "[my_backup:my_snapshot_2023.06.30/Pl0QeAojSgq1p6PYI_JdDg] cannot restore index [.ds-ilm-history-5-2023.02.17-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"
  },
  "status": 500
}

The Elasticsearch instance under the test is running on a local virtual machine, and we have backups of the virtual machine. So, we can try any command, if necessary, without risk.

Our Question:

  • The command GET /_cat/indices does not show any of the internal indices. So, how to list all the internal system indices?

  • We are new to the backup and restore function, so we wonder if there was anything wrong when taking the snapshot before. We used the command PUT /_snapshot/my_backup/%3Cmy_snapshot_%7Bnow%2Fd%7D%3E, and not sure if we should include additional arguments to ignore the system indices.

We will highly appreciate any hints and suggestions.

Hi @Mike_Z What version are you on?

If you are trying to test a full restore please take a look here

Otherwise just list the indices/data streams you are trying to restore using the indices parameter which can take wildcards / multi-target syntax.

Since you are not setting either the restore is trying to restore everything without instructions.

If you only want to snapshot and restore data / certain indices and data streams then you could name them when creating the snapshot

1 Like

Resolved the issue with @stephenb 's advice:

I should restore only the my-index-00001 index, not to restore the entire cluster. However, the "Restore an entire cluster" procedure works anyway.

I also verified the procedure of restoring a specific index.

Thank you again for the help.

1 Like

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