# Elastic search snapshot and restore using Azure repository

**URL:** <https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028>\
**Category:** Elasticsearch\
**Created:** [June 27, 2016, 10:59am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028 "2016-06-27T10:59:53Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheeba](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sheeba](https://discuss.elastic.co/u/sheeba)\
**Post date:** [June 27, 2016, 10:59am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/1 "2016-06-27T10:59:53Z")

</div>

I want to take snapshot and restore using azure repository in Linux, I have configured these below setting in yml, but in the doc it says that this configuration is for previous version,but when i tried the new version configuration, elastic search service is not starting.

with the below setting, service is started, i m getting below error when creating [repository.my](http://repository.my) azure plugin and elastic search version is 2.3.3.

```auto
cloud:
    		azure:
        		storage_account: your_azure_storage_account
        		storage_key: your_azure_storage_key

```

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "repository_exception",
        "reason": "[my_backup] failed to create repository"
      }
    ],
    "type": "repository_exception",
    "reason": "[my_backup] failed to create repository",
    "caused_by": {
      "type": "illegal_argument_exception",
      "reason": "Unknown [repository] type [azure]"
    }
  },
  "status": 500
}

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 27, 2016, 11:27am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/2 "2016-06-27T11:27:36Z")

</div>

Could you try:

```auto
cloud:
    azure:
        storage:
            my_account:
                account: your_azure_storage_account
                key: your_azure_storage_key

```

Source: [https://www.elastic.co/guide/en/elasticsearch/plugins/current/cloud-azure-repository.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/cloud-azure-repository.html)

---

<div class="post-metadata">

**Author:** ![sheeba](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sheeba](https://discuss.elastic.co/u/sheeba)\
**Post date:** [June 27, 2016, 11:31am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/3 "2016-06-27T11:31:20Z")

</div>

This is working,

cloud:  
azure:  
storage:  
account: your\_azure\_storage\_account  
key: your\_azure\_storage\_key

but i'm not able to create a repository. getting this error **This might indicate that the store [elasticsearch-snapshots] is not shared between this node and the master node or that permissions on the store don't allow reading files written by the master node**

I was trying to take back up in blob.

---

<div class="post-metadata">

**Author:** ![sheeba](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sheeba](https://discuss.elastic.co/u/sheeba)\
**Post date:** [June 27, 2016, 11:39am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/4 "2016-06-27T11:39:27Z")

</div>

using ?verify=false parameter, repository verification is skipped, whether this is correct approach?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 27, 2016, 3:29pm UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/5 "2016-06-27T15:29:00Z")

</div>

So the settings are corrects but may be you have more than one node and you did not restart all the nodes?

---

<div class="post-metadata">

**Author:** ![sheeba](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sheeba](https://discuss.elastic.co/u/sheeba)\
**Post date:** [June 28, 2016, 4:27am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/6 "2016-06-28T04:27:07Z")

</div>

I have restarted all the nodes, but still getting this below error

**This might indicate that the store is not shared between this node and the master node or that permissions on the store don't allow reading files written by the master node**

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 28, 2016, 5:25am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/7 "2016-06-28T05:25:04Z")

</div>

Can you see anything in logs?

---

<div class="post-metadata">

**Author:** ![sheeba](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sheeba](https://discuss.elastic.co/u/sheeba)\
**Post date:** [June 28, 2016, 5:47am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/8 "2016-06-28T05:47:59Z")

</div>

No, i could see this error in log, but it seems to be related to service restarted, when i check the node status, all the nodes are joined.

[2016-06-28 04:20:27,000][WARN][discovery.zen.ping.unicast] [master-node-1] failed to send ping to [{#zen\_unicast\_2#}{10.0.1.5}{10.0.1.5:9300}]  
RemoteTransportException[[master-node-0][10.0.1.5:9300][internal:discovery/zen/unicast]]; nested: IllegalStateException[received ping request while not started];  
Caused by: java.lang.IllegalStateException: received ping request while not started

What is the cause of the store sharing between data node and master nodes? since it is azure blob, it should be working right?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 28, 2016, 6:32am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/9 "2016-06-28T06:32:43Z")

</div>

> What is the cause of the store sharing between data node and master nodes?

That's what we are trying to find here.

> since it is azure blob, it should be working right?

Yes.

Can you run:

```auto
PUT /_cluster/settings
{
  "transient": {
    "logger.repositories.azure": "TRACE",
    "logger.cloud.azure": "TRACE"
  }
}

```

And run the create repository command again?  
And paste all logs here (formatted please) or on [gist.github.com](http://gist.github.com).

If nothing more appears, could you change `logging.yml` file and add:

```auto
   repositories.azure: TRACE
   cloud.azure: TRACE

```

Then restart your node. And do the same create repository command again?

---

<div class="post-metadata">

**Author:** ![sheeba](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sheeba](https://discuss.elastic.co/u/sheeba)\
**Post date:** [June 28, 2016, 6:53am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/10 "2016-06-28T06:53:30Z")

</div>

In logs,

```
[2016-06-28 06:42:33,502][TRACE][cloud.azure.storage] [master-node-1] selecting a client for account [null], mode [PRIMARY_ONLY]
[2016-06-28 06:42:33,653][WARN][repositories] [master-node-1] [my_backuplogs] failed to verify repository
RepositoryVerificationException[[my_backuplogs] a file written by master to the store [mybackuplogs] cannot be accessed on the node [{master-node-1}{ai44ymiSTfGg0dgMF9$
        at org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository.verify(BlobStoreIndexShardRepository.java:247)
        at org.elasticsearch.repositories.VerifyNodeRepositoryAction.doVerify(VerifyNodeRepositoryAction.java:121)
        at org.elasticsearch.repositories.VerifyNodeRepositoryAction.access$200(VerifyNodeRepositoryAction.java:50)
        at org.elasticsearch.repositories.VerifyNodeRepositoryAction$VerifyNodeRepositoryRequestHandler.messageReceived(VerifyNodeRepositoryAction.java:156)
        at org.elasticsearch.repositories.VerifyNodeRepositoryAction$VerifyNodeRepositoryRequestHandler.messageReceived(VerifyNodeRepositoryAction.java:152)
        at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)
        at org.elasticsearch.shield.transport.ShieldServerTransportService$ProfileSecuredRequestHandler.messageReceived(ShieldServerTransportService.java:180)
        at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:75)
        at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:245)
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:114)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 28, 2016, 9:18am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/11 "2016-06-28T09:18:50Z")

</div>

I updated your answer. Please format your messages with `</>` button to make them easier to read.

May be you could paste all the logs from all nodes to [gist.github.com](http://gist.github.com)?

Check that every node has write access to the azure repo.

---

<div class="post-metadata">

**Author:** ![sheeba](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sheeba](https://discuss.elastic.co/u/sheeba)\
**Post date:** [June 28, 2016, 9:54am UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/12 "2016-06-28T09:54:36Z")

</div>

Thank you so much for the help..

It works, issue is blob does not have write access.Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:39pm UTC](https://discuss.elastic.co/t/elastic-search-snapshot-and-restore-using-azure-repository/54028/13 "2017-07-05T22:39:57Z")

</div>


