Elastic search v2.3.1backup of an index and restoration

Hi,

I am trying to create back up of one index in elastic search v2.3.1. the lucene version is 5.5.0.

While creating snapshot repository,

URI - /_snapshot/my_backup

     {
      "my_backup": {
        "type": "fs",
        "settings": {
          "compress": true,
          "location": "/mount/backups/my_backup"
        }
      }
    }

I get following error with response status code - 400 Bad request

{
  "error": {
    "root_cause": [
      {
        "type": "action_request_validation_exception",
        "reason": "Validation Failed: 1: type is missing;"
      }
    ],
    "type": "action_request_validation_exception",
    "reason": "Validation Failed: 1: type is missing;"
  },
  "status": 400
}

What am I doing wrong?

your request is malformed. Have a look at the docs:

https://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html

it should be

PUT /_snapshot/my_backup
{
  "type": "fs",
  "settings": {
        ... repository specific settings ...
  }
}

and not

PUT /_snapshot/my_backup
{
  "my_backup": {
      "type": "fs",
      "settings": {
             ... repository specific settings ...
      }
    }
}

Yup my bad! I realised it later.

Thank you for reverting.

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