Failed to restore the incdices

we are unable to restore some indices and get json_parse_exception. repo is in S3 bucket.

curl -u user:passwd - H 'Content-Type: application/json' -XPOST https://<hostname>:9200/_snapshot/<reponame>/<snapshot_name>/_restore?wait_for_completion=false -d @index_to_restore.json

cat index_to_restore.json
{
    "indices": "index name",
    "index_settings": {"index.number_of_replicas": 0},
    "rename_pattern": "(.+)",
    "rename_replacement": "$1_restore",
    "include_aliases": false,
    "ignore_unavailable": true
}

Error

{
  "error" : {
    "root_cause" : [
      {
        "type" : "json_parse_exception",
        "reason" : "Duplicate field 'fv'\n at [Source: (org.elasticsearch.repositories.blobstore.ChecksumBlobStoreFormat$DeserializeMetaBlobInputStream); line: -1, column: 226424]"
      }
    ],
    "type" : "json_parse_exception",
    "reason" : "Duplicate field 'fv'\n at [Source: (org.elasticsearch.repositories.blobstore.ChecksumBlobStoreFormat$DeserializeMetaBlobInputStream); line: -1, column: 226424]"
  },
  "status" : 400
}

Elasticsearch version is 7.16.2.

could you please let me know why _restore API is failed with json_parser_exception for some indices?

is it possible to ignore the field while restoring the index?

1 Like

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