# Elasticsearch repositoryが作成できない

**URL:** <https://discuss.elastic.co/t/elasticsearch-repository/258383>\
**Category:** 日本語による質問・議論はこちら\
**Created:** [December 11, 2020, 8:00am UTC](https://discuss.elastic.co/t/elasticsearch-repository/258383 "2020-12-11T08:00:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Username](https://avatars.discourse-cdn.com/v4/letter/_/7ba0ec/32.png) [@\_Username](https://discuss.elastic.co/u/_Username)\
**Post date:** [December 11, 2020, 8:00am UTC](https://discuss.elastic.co/t/elasticsearch-repository/258383/1 "2020-12-11T08:00:39Z")

</div>

* * *

## 【問合せ内容】 Elasticsearchのsnapshot取得のため、リポジトリを作成しようとしているが、【現象】エラーが発生してリポジトリを作成できない。 同じ事象の情報や、原因調査方法など、助言をいただきたく、宜しくお願いいたします。

## 【環境】 Windows10 PRO(バージョン 1909)(※開発環境のため、スタンドアロン) Elasticsearch 7.9.2 kibana 7.9.2

## 【参考】 スナップショットと復元 [https://www.elastic.co/guide/en/elasticsearch/reference/7.9/snapshot-restore.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/snapshot-restore.html) スナップショットリポジトリを登録する [https://www.elastic.co/guide/en/elasticsearch/reference/7.9/snapshots-register-repository.html#snapshots-register-repository](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/snapshots-register-repository.html#snapshots-register-repository)

## 【現象】 「スナップショットと復元」手順に沿ってsnapshotを取得するため、リポジトリを作成しようとしているが、下記エラーが発生しリポジトリを作成できない。 ＜エラー内容＞ { "error" : { "root\_cause" : [{ "type" : "repository\_exception", "reason" : "[my\_fs\_backup] location [\\hostname1\repositories\my\_fs\_backup\_location] doesn't match any of the locations specified by path.repo because this setting is empty" } ], "type" : "repository\_exception", "reason" : "[my\_fs\_backup] failed to create repository", "caused\_by" : { "type" : "repository\_exception", "reason" : "[my\_fs\_backup] location [\\hostname1\repositories\my\_fs\_backup\_location] doesn't match any of the locations specified by path.repo because this setting is empty" } }, "status" : 500 }

## 【実行手順】 リポジトリの作成（共有ファイルシステムリポジトリ） １．共有フォルダの作成（エクスプローラーでフォルダを作成） 「C:\ProgramData\Elastic\Elasticsearch\repositories」 ２．フォルダの共有設定 「\hostname1\repositories」 ３．共有フォルダのアクセス権設定(everyone：フルコントロール) ４．「elasticsearch.yml」に「path.repo」を追加 「path.repo: ["\\hostname1\repositories"]」 ５．「elasticsearch」のサービス再起動 ６．「elasticsearch」の起動確認 「[http://localhost:9200/」](http://localhost:9200/%E3%80%8D) ７．「kibana」の「Dev Tools」で下記コマンドを実行する PUT /\_snapshot/my\_fs\_backup { "type": "fs", "settings": { "location": "\\hostname1\repositories\my\_fs\_backup\_location", "compress": true } } ８．【現象】エラー発生

---

<div class="post-metadata">

**Author:** ![taku333](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taku333/32/40375_2.png) [@taku333](https://discuss.elastic.co/u/taku333)\
**Post date:** [December 14, 2020, 3:38am UTC](https://discuss.elastic.co/t/elasticsearch-repository/258383/2 "2020-12-14T03:38:08Z")

</div>

この件と同じ事象ではないですかね？

> [@Location \[\*\*\*\*\] doesn't match any of the locations specified by path.repo because this setting is empty](https://discuss.elastic.co/t/location-doesnt-match-any-of-the-locations-specified-by-path-repo-because-this-setting-is-empty/38579/11):
>
> I mount this folder with fstab file and cifs I have permisions to read and write, but i'm not usre if elasticsearch has permisions. I cannot change permisions on ES server because is a shared folder from a windows server. What's the best way to use nfs to make snapshots on ES?

---

<div class="post-metadata">

**Author:** ![\_Username](https://avatars.discourse-cdn.com/v4/letter/_/7ba0ec/32.png) [@\_Username](https://discuss.elastic.co/u/_Username)\
**Post date:** [December 14, 2020, 7:19am UTC](https://discuss.elastic.co/t/elasticsearch-repository/258383/3 "2020-12-14T07:19:06Z")

</div>

taku333様  
ご連絡いただきありがとうございます。  
いただいた情報をヒントに解決いたしました。

原因は仮想化フォルダ(VirtualStore)の影響でした。  
※C:\Users[ユーザー]\AppData\Local\VirtualStore\ProgramData\Elastic\Elasticsearch\Config\Elasticsearch.yml

「Elasticsearch.yml」を仮想化フォルダから正しいフォルダへ上書き保存することで解決いたしました。  
※ C:\ProgramData\Elastic\Elasticsearch\Config\Elasticsearch.yml

ありがとうございました。

---

<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:** [January 11, 2021, 7:19am UTC](https://discuss.elastic.co/t/elasticsearch-repository/258383/4 "2021-01-11T07:19:10Z")

</div>

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