Getting error to run the snapshot script to back up indexes


(Ganesh) #1

HI,
i want to take back up my indices using snapshot and my ES is running on docker,

cluster.name: "docker-cluster"
node.name: lpdosput020008.node
node.master: true
node.data: false
node.ingest: false
node.ml: false
xpack.ml.enabled: true
#network.host: 0.0.0.0
network.bind_host: 0.0.0.0
network.publish_host: 10.3.195.14
path.repo: ["/usr/share/elasticsearch/snapshot"]


discovery.zen.ping.unicast.hosts: ["10.3.195.14","10.3.195.38","10.3.195.41","10.3.195.43","10.3.195.37","10.3.195.17"]
discovery.zen.minimum_master_nodes: 2
#xpack.license.self_generated.type: trial
xpack.security.enabled: true
#xpack.monitoring.enabled : true
#xpack.security.http.ssl.enabled: true
#xpack.security.http.ssl.key: /usr/share/elasticsearch/config/elasticsearch/elasticsearch.key
#xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/elasticsearch/elasticsearch.crt
#xpack.security.http.ssl.client_authentication: none
#xpack.security.http.ssl.verification_mode: certificate

I have defined the snapshot path in es yml and getting below error while running below,

PUT /_snapshot/test
{
    "type": "fs",
    "settings": {
        "location": "/usr/share/elasticsearch/snapshot",
        "compress": true
    }

Error msg:

{
  "error": {
    "root_cause": [
      {
        "type": "exception",
        "reason": "failed to create blob container"
      }
    ],
    "type": "exception",
    "reason": "failed to create blob container",
    "caused_by": {
      "type": "access_denied_exception",
      "reason": "/usr/share/elasticsearch/snapshot/tests-5ZGUmWT4Tg2oa5_gte4Dbw"
    }
  },
  "status": 500
}