Path.repo not found

Hi All

I am getting the below error while creating repository on windows

CMD
.......

POST /_snapshot/backup1
{
"type": "fs",
"settings": {
"location": "c:\es_backup_folder",
"compress": "true"
}
}

Entry in elasticsearch.yml
......................................
C:\elasticsearch-1.6.0\config\elasticsearch.yml
path.repo: c:\es_backup_folder

Error
........
location [c:\es_backup_folder] doesn't match any of the locations specified by path.repo because this setting is empty

Replace \ with /

Hi David

Its not working

POST http://localhost:9200/_snapshot/backup
{
"type": "fs",
"settings": {
"location": "c://es_backup_folder",
"compress": "true"
}
}

Don't put here c:/ and do this also in elasticsearch.yml file

Hi David

I am doing it on Windows, so we need to give the drive location

Yes. You need to define the drive if elasticsearch is running on another drive. I think it should work otherwise.

If not, try something like /c:/path/to/...

Might work.

Hi David

I am sharing with you below my code.

My code
.............
POST _snapshot/MyRepo
{"type": "fs","settings": {"location": "c:\MyRepo"}}

Error
..........
{
"error": "RemoteTransportException[[Bes][inet[/10.252.49.110:9300]][cluster:admin/repository/put]]; nested: RepositoryException[[MyRepo] failed to create repository]; nested: CreationException[Guice creation errors:\r\n\r\n1) Error injecting constructor, org.elasticsearch.repositories.RepositoryException: [MyRepo] location [c:\MyRepo] doesn't match any of the locations specified by path.repo because this setting is empty\r\n at org.elasticsearch.repositories.fs.FsRepository.()\r\n at org.elasticsearch.repositories.fs.FsRepository\r\n at Key[type=org.elasticsearch.repositories.Repository, annotation=[none]]\r\n\r\n1 error]; nested: RepositoryException[[MyRepo] location [c:\MyRepo] doesn't match any of the locations specified by path.repo because this setting is empty]; ",
"status": 500
}

I think this won't work. Also I think you did not set path.repo in elasticsearch.yml file or you did not restart your node. [c:\MyRepo] doesn't match any of the locations specified by path.repo because this setting is empty]