Doesn't match any of the locations specified by path.repo because this setting is empty"

Hello friends i have a problem. I can't backup indices.
my elasticsearch.yml file:

# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: C:/elastic_stack/elasticsearch-7.13.1/lib
#
# Path to log files:
#
path.logs: C:/elastic_stack/elasticsearch-7.13.1/logs
#


path:
  repo:
    - "C://elastic_stack//elasticsearch-7.13.1//esbackup"       

I'm trying from kibana :

PUT /_snapshot/my_backup
{
  "type": "fs",
  "settings": {
    "location": "C://elastic_stack//elasticsearch-7.13.1//esbackup",
    "compress": true
  }
}

Error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "repository_exception",
        "reason" : "[my_backup] location [C://elastic_stack//elasticsearch-7.13.1//esbackup] doesn't match any of the locations specified by path.repo because this setting is empty"
      }
    ],
    "type" : "repository_exception",
    "reason" : "[my_backup] failed to create repository",
    "caused_by" : {
      "type" : "repository_exception",
      "reason" : "[my_backup] location [C://elastic_stack//elasticsearch-7.13.1//esbackup] doesn't match any of the locations specified by path.repo because this setting is empty"
    }
  },
  "status" : 500
}

Please help me dear friends :pensive:

Your path separators are leaning the wrong way: on Windows it's \ not /.

1 Like

It was written on elasticsearch's official site that do not use oblique slash.

Windows installations support both DOS and Microsoft UNC paths. Escaped any backslashes in the paths. For UNC paths, provide the server and share name as a prefix.

path:
repo:
- "E:\Mount\Backups"
- "\\MY_SERVER\Mount\Long_term_backups"

I'm confused, the docs you quote use the correct slash for Windows (\) whereas the config you shared previously uses the wrong one (/).

I am also confused when I use (\) in elasticsearch.yml I cannot run elasticsearch.bat file.

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