I created s3 repository for snapshot and restore but unable to restore it using created snapshot?

Query for creating s3 repository:

PUT /_snapshot/s3_repository?verify=false
{
  "type": "s3",
  "settings": {
    "bucket": "appneura-elasticsearch-snapshot-backup",
    "region": "us-west-2",
    "access_key": "********",
    "secret_key": "********"
  }
}

Note: I can use elasticsearch-keystore also for security purpose to mention "access_key" & "secret_key"

Output for above query is:

{
  "acknowledged": true
}

After creating repository, i have created a snapshot using this query:

PUT /_snapshot/s3_repository/alerttrial?pretty&wait_for_completion=true
{

   "indices": "alertbrowser",  

   "ignore_unavailable": true,

   "include_global_state": false

}

After creating snapshot, i checked the status of created snapshot using query as:

GET /_snapshot/s3_repository/alerttrial

and output is as follows:

    {
      "snapshots": [
        {
          "snapshot": "alerttrial",
          "uuid": "yd6VMruSSQ6Hlx6o-GWjww",
          "version_id": 5050299,
          "version": "5.5.2",
          "indices": [
            "alertbrowser"
          ],
          "state": "SUCCESS",
          "start_time": "2017-12-15T11:39:09.834Z",
          "start_time_in_millis": 1513337949834,
          "end_time": "2017-12-15T11:46:24.856Z",
          "end_time_in_millis": 1513338384856,
          "duration_in_millis": 435022,
          "failures": [],
          "shards": {
            "total": 5,
            "failed": 0,
            "successful": 5
          }
        }
      ]
    }

As the above output is clearly indicating that inside repository with this "uuid": "yd6VMruSSQ6Hlx6o-GWjww" a snapshot has been created successfully.

Now after that i close that index first using this query:
POST /alertbrowser/_close

After closing index, i want to do restore from created snapshot, for that i have use this query:

POST /_snapshot/s3_repository/alerttrial/_restore
{

    "indices": "index_1_alert_snap",

    "ignore_unavailable": true

}

result of this query is as follows:

{
  "snapshot": {
    "snapshot": "alerttrial",
    "indices": [],
    "shards": {
      "total": 0,
      "failed": 0,
      "successful": 0
    }
  }
}

it is not restroing data to mention index (index_1_alert_snap). So where i am doing mistake or what i am missing, please tell me.If required i can paste a s3 bucket IAM console policy also.

It looks to me like you are trying to restore an index you did not include in the snapshot.

Yes, correct.Thanx. Thats silly me........:stuck_out_tongue:

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