# Creating Snapshot Repository on Windows cluster

**URL:** <https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316>\
**Category:** Elasticsearch\
**Created:** [April 20, 2015, 8:57am UTC](https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316 "2015-04-20T08:57:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_Judson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sam_judson/32/752_2.png) [@Sam\_Judson](https://discuss.elastic.co/u/Sam_Judson)\
**Post date:** [April 20, 2015, 8:57am UTC](https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316/1 "2015-04-20T08:57:42Z")

</div>

Hi

I'm having some trouble creating a snapshot repository on a cluster running  
on Windows.

PUT \_snapshot/main\_backup  
{  
"type": "fs",  
"settings": {  
"location": "\\gbr-t-ess-003\Snapshots\backup2\",  
"compress": true  
}  
}

The above fails with a BlobStoreException: Failed to create directory.

I've set the Share to Everyone Read/Write access to hopefully get this  
working but still no good.

I've tried creating symbolic links on each machine and using local  
directory path, but no luck either.

Anyone got this working?

Sam

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/070addde-3528-425d-ab43-f1c3e1399e93%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/070addde-3528-425d-ab43-f1c3e1399e93%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sam\_Judson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sam_judson/32/752_2.png) [@Sam\_Judson](https://discuss.elastic.co/u/Sam_Judson)\
**Post date:** [April 21, 2015, 11:10am UTC](https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316/2 "2015-04-21T11:10:46Z")

</div>

Sorry to bump, but anyone have any idea on this one, as I'm stumped.

Does anyone need any more information?

Sam

On Monday, 20 April 2015 09:57:42 UTC+1, Sam Judson wrote:

> Hi
> 
> I'm having some trouble creating a snapshot repository on a cluster  
> running on Windows.
> 
> PUT \_snapshot/main\_backup  
> {  
> "type": "fs",  
> "settings": {  
> "location": "\\gbr-t-ess-003\Snapshots\backup2\",  
> "compress": true  
> }  
> }
> 
> The above fails with a BlobStoreException: Failed to create directory.
> 
> I've set the Share to Everyone Read/Write access to hopefully get this  
> working but still no good.
> 
> I've tried creating symbolic links on each machine and using local  
> directory path, but no luck either.
> 
> Anyone got this working?
> 
> Sam

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![deepak\_daffodil](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@deepak\_daffodil](https://discuss.elastic.co/u/deepak_daffodil)\
**Post date:** [April 21, 2015, 11:34am UTC](https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316/3 "2015-04-21T11:34:39Z")

</div>

this problem may be due to the reason that the directory you are providing  
is not accepting Binary data  
you can try by changing the directory and provide read-write permissions to  
the directory

On Tue, Apr 21, 2015 at 4:40 PM, Sam Judson [samjudson@gmail.com](mailto:samjudson@gmail.com) wrote:

> Sorry to bump, but anyone have any idea on this one, as I'm stumped.
> 
> Does anyone need any more information?
> 
> Sam
> 
> On Monday, 20 April 2015 09:57:42 UTC+1, Sam Judson wrote:
> 
> > Hi
> > 
> > I'm having some trouble creating a snapshot repository on a cluster  
> > running on Windows.
> > 
> > PUT \_snapshot/main\_backup  
> > {  
> > "type": "fs",  
> > "settings": {  
> > "location": "\\gbr-t-ess-003\Snapshots\backup2\",  
> > "compress": true  
> > }  
> > }
> > 
> > The above fails with a BlobStoreException: Failed to create directory.
> > 
> > I've set the Share to Everyone Read/Write access to hopefully get this  
> > working but still no good.
> > 
> > I've tried creating symbolic links on each machine and using local  
> > directory path, but no luck either.
> > 
> > Anyone got this working?
> > 
> > Sam
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHzCMpr2PS4%2BbmnNZO6iojkpzZFSEa8c7oVha-8HEcnt\_BK5Gw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHzCMpr2PS4%2BbmnNZO6iojkpzZFSEa8c7oVha-8HEcnt_BK5Gw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![deepak\_daffodil](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@deepak\_daffodil](https://discuss.elastic.co/u/deepak_daffodil)\
**Post date:** [April 21, 2015, 11:43am UTC](https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316/4 "2015-04-21T11:43:40Z")

</div>

the problem might be in your location syntax .  
please change the location path to  
"location" ;" \gbr-t-ess-003\Snapshots\backup2\"

On Tue, Apr 21, 2015 at 5:04 PM, Deepak Chauhan \<  
[deepak.chauhan@daffodilsw.com](mailto:deepak.chauhan@daffodilsw.com)\> wrote:

> this problem may be due to the reason that the directory you are providing  
> is not accepting Binary data  
> you can try by changing the directory and provide read-write permissions  
> to the directory
> 
> On Tue, Apr 21, 2015 at 4:40 PM, Sam Judson [samjudson@gmail.com](mailto:samjudson@gmail.com) wrote:
> 
> > Sorry to bump, but anyone have any idea on this one, as I'm stumped.
> > 
> > Does anyone need any more information?
> > 
> > Sam
> > 
> > On Monday, 20 April 2015 09:57:42 UTC+1, Sam Judson wrote:
> > 
> > > Hi
> > > 
> > > I'm having some trouble creating a snapshot repository on a cluster  
> > > running on Windows.
> > > 
> > > PUT \_snapshot/main\_backup  
> > > {  
> > > "type": "fs",  
> > > "settings": {  
> > > "location": "\\gbr-t-ess-003\Snapshots\backup2\",  
> > > "compress": true  
> > > }  
> > > }
> > > 
> > > The above fails with a BlobStoreException: Failed to create directory.
> > > 
> > > I've set the Share to Everyone Read/Write access to hopefully get this  
> > > working but still no good.
> > > 
> > > I've tried creating symbolic links on each machine and using local  
> > > directory path, but no luck either.
> > > 
> > > Anyone got this working?
> > > 
> > > Sam
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHzCMprNTnaD2iSMqKQCKrSH0Fnwhwk4cYu4-d-%3DV%3DMUk0\_4pw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHzCMprNTnaD2iSMqKQCKrSH0Fnwhwk4cYu4-d-%3DV%3DMUk0_4pw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Sam\_Judson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sam_judson/32/752_2.png) [@Sam\_Judson](https://discuss.elastic.co/u/Sam_Judson)\
**Post date:** [April 21, 2015, 1:19pm UTC](https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316/5 "2015-04-21T13:19:47Z")

</div>

Hi

Thanks for the reply.Unfortunately I've tried all of those things already.  
As I say, I've got the permissions wide open (full control on Everyone) for  
both the share and the file system underneath.

You have to escape the UNC path in JSON, I've tried double escaping etc.  
with no luck. I've tried the following:

file:////gbr-t-ess-003/Snapshots/backup2  
file://gbr-t-ess-003/Snapshots/backup2  
////gbr-t-ess-003/Snapshots/backup2  
//gbr-t-ess-003/Snapshots/backup2  
file:////////gbr-t-ess-003//Snapshots//backup2  
\\gbr-t-ess-003\Snapshots\backup2  
\\\\gbr-t-ess-003\\Snapshots\\backup2

I've read the Eclipse page on UNC paths  
here: [Eclipse/UNC Paths - Eclipsepedia](http://wiki.eclipse.org/Eclipse/UNC_Paths)

None of which has got me any closer to getting this to work unfortunately.

The full error if it helps:

{  
"error": "RepositoryException[[main\_backup] failed to create  
repository]; nested: CreationException[Guice creation errors:\r\n\r\n1)  
Error injecting constructor,  
org.elasticsearch.common.blobstore.BlobStoreException: Failed to create  
directory at [\\gbr-t-ess-003\Snapshots\backup2]\r\n at  
org.elasticsearch.repositories.fs.FsRepository.(Unknown Source)\r\n  
while locating org.elasticsearch.repositories.fs.FsRepository\r\n while  
locating org.elasticsearch.repositories.Repository\r\n\r\n1 error]; nested:  
BlobStoreException[Failed to create directory at  
[\\gbr-t-ess-003\Snapshots\backup2]]; ",  
"status": 500  
}

Sam

On Tuesday, 21 April 2015 12:43:47 UTC+1, deepak.chauhan wrote:

> the problem might be in your location syntax .  
> please change the location path to  
> "location" ;" \gbr-t-ess-003\Snapshots\backup2\"
> 
> On Tue, Apr 21, 2015 at 5:04 PM, Deepak Chauhan \<[deepak....@daffodilsw.com](mailto:deepak....@daffodilsw.com)  
> \<javascript:\>\> wrote:
> 
> > this problem may be due to the reason that the directory you are  
> > providing is not accepting Binary data  
> > you can try by changing the directory and provide read-write permissions  
> > to the directory
> > 
> > On Tue, Apr 21, 2015 at 4:40 PM, Sam Judson \<[samj...@gmail.com](mailto:samj...@gmail.com)  
> > \<javascript:\>\> wrote:
> > 
> > > Sorry to bump, but anyone have any idea on this one, as I'm stumped.
> > > 
> > > Does anyone need any more information?
> > > 
> > > Sam
> > > 
> > > On Monday, 20 April 2015 09:57:42 UTC+1, Sam Judson wrote:
> > > 
> > > > Hi
> > > > 
> > > > I'm having some trouble creating a snapshot repository on a cluster  
> > > > running on Windows.
> > > > 
> > > > PUT \_snapshot/main\_backup  
> > > > {  
> > > > "type": "fs",  
> > > > "settings": {  
> > > > "location": "\\gbr-t-ess-003\Snapshots\backup2\",  
> > > > "compress": true  
> > > > }  
> > > > }
> > > > 
> > > > The above fails with a BlobStoreException: Failed to create directory.
> > > > 
> > > > I've set the Share to Everyone Read/Write access to hopefully get this  
> > > > working but still no good.
> > > > 
> > > > I've tried creating symbolic links on each machine and using local  
> > > > directory path, but no luck either.
> > > > 
> > > > Anyone got this working?
> > > > 
> > > > Sam
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/26f31ff5-d81c-47d3-8cea-94bdc5da65f6%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8b8d07c7-2d0e-4aa5-854a-e1ac6f56ff0e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8b8d07c7-2d0e-4aa5-854a-e1ac6f56ff0e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![foresightyj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/foresightyj/32/3666_2.png) [@foresightyj](https://discuss.elastic.co/u/foresightyj)\
**Post date:** [July 22, 2015, 3:19am UTC](https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316/6 "2015-07-22T03:19:05Z")

</div>

Hi Sam,

I am curious about your final solution to this problem. I have a similar case. I have a cluster consisting of a windows and a linux machine.

I installed samba server in the linux machine, and through windows file explorer, I could get in and create and edit files. In the windows machine, I had this line in my elasticsearch.yml:

```
path.repo: ["\\\\10.162.59.163\\es_ubuntu"]

{
   "error": "RepositoryException[[fht360_backup] failed to create repository]; nested: CreationException[Guice creation errors:\r\n\r\n1) Error injecting constructor, org.elasticsearch.common.blobstore.BlobStoreException: Failed to create directory at [\\\\10.162.59.163\\es_ubuntu\\fht360_backup]\r\n at org.elasticsearch.repositories.fs.FsRepository.<init>(Unknown Source)\r\n while locating org.elasticsearch.repositories.fs.FsRepository\r\n while locating org.elasticsearch.repositories.Repository\r\n\r\n1 error]; nested: BlobStoreException[Failed to create directory at [\\\\10.162.59.163\\es_ubuntu\\fht360_backup]]; ",
   "status": 500
}

```

I even wrote a C# program to verify that I could create file in that networked directory.

---

<div class="post-metadata">

**Author:** ![andrzejm](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@andrzejm](https://discuss.elastic.co/u/andrzejm)\
**Post date:** [May 13, 2016, 3:29pm UTC](https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316/7 "2016-05-13T15:29:01Z")

</div>

I've posted answer here (it seems like duplicate questions):

> [@Can't create snapshot repository on Windows cluster](https://discuss.elastic.co/t/cant-create-snapshot-repository-on-windows-cluster/624/3):
>
> Try to share the last directory directly like this: "location": "\\\\gbr-t-ess-003\\backup2" (just the server and the share) I have reproduced your issue, and then tried shorter path and succeeded. Hope it helps.

---

<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:51pm UTC](https://discuss.elastic.co/t/creating-snapshot-repository-on-windows-cluster/23316/8 "2017-07-05T22:51:44Z")

</div>


