Hello,
I am using elasticsearch v5 and I am trying to create snapshots to the gce storage. I have a bucket created for all kind of backups that is why I would like to puthe elasticsearch backups into their own folder.
If I use the following command everything is OK but the indexes are placed into the root of the bucket
curl -XPUT http://localhost:19270/_snapshot/test?pretty -H 'Content-Type: application/json' -d'
{
"type": "gcs",
"settings": {
"bucket": "gce_snapshots",
"service_account": "service_account.json"
}
}
'
I have tried precreating the folders on the gce bucket and use it like this:
curl -XPUT http://localhost:19270/_snapshot/test?pretty -H 'Content-Type: application/json' -d'
{
"type": "gcs",
"settings": {
"bucket": "gce_snapshot/test",
"service_account": "service_account.json"
}
}
'
but I get the following error:
{
"error" : {
"root_cause" : [
{
"type" : "blob_store_exception",
"reason" : "Unable to check if bucket [gce_snapshot/test] exists"
}
],
"type" : "repository_exception",
"reason" : "[test] failed to create repository",
"caused_by" : {
"type" : "blob_store_exception",
"reason" : "Unable to check if bucket [gce_snapshot/test] exists",
"caused_by" : {
"type" : "google_json_response_exception",
"reason" : "400 Bad Request\n{\n \"code\" : 400,\n \"errors\" : [ {\n \"domain\" : \"global\",\n \"message\" : \"Invalid bucket name: 'gce_snapshot/test'\",\n \"reason\" : \"invalid\"\n } ],\n \"message\" : \"Invalid bucket name: 'snapshots.wpcloud.io/test'\"\n}"
}
}
},
"status" : 500
}
Any idea how to achieve this?