How to take the snaphsot in Es

Hi Team,

I need to take the snapshot of one index , i have confgiured in elasticsearch.yml like this

path.repo: ["/home/tf-java4/Desktop/esbackup"]

while creating repository facing this exception , can anyone help me to resolve this issue?

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

The path you specify for your snapshot repository must be under the directory specified in path.repo, e.g. /home/tf-java4/Desktop/esbackup/snapshot1.

Thank you Christian

i have added path.repo: ["/home/tf-java4/Desktop/esbackup"] like this , i have mentioned same path while creating the repository

curl -XPUT 'localhost:9200/_snapshot/timo_backup2' -H 'Content-Type: application/json' -d'

{
"type": "fs",
"settings": {
"compress" : true,
"location": "/home/tf-java4/Desktop/esbackup"
}
}'

facing this exception

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

Have you restarted Elasticsearch since you updated path.repo?

yes i have restarted the elasticsearch after these changes made, my config yml path is

elasticsearch-6.4.0/data/etc/elasticsearch/elasticsearch.yml

cluster.name: my-application

------------------------------------ Node ------------------------------------

Use a descriptive name for the node:

node.name: node-1

path.repo: ["/home/tf-java4/Desktop/esbackup"]

Add custom attributes to the node:

#node.attr.rack: r1

----------------------------------- Paths ------------------------------------

Path to directory where to store the data (separate multiple locations by comma):

path.data: /var/lib/elasticsearch

Path to log files:

path.logs: /var/log/elasticsearch

----------------------------------- Memory -----------------------------------

Lock the memory on startup:

#bootstrap.memory_lock: true

Are you sure that is the configuration file that is being picked up? How did you install Elasticsearch? What operating system are you using?

yes,my OS is ubuntu , i have installed elasticsearch as with debian package.i am not sure this is the config file is picked up or not , inside the folder i have checked one yml file is there

Then I would expect it to use the config file located in the /etc/elasticsearch directory as outlined in the documentation.

1 Like

Thanks @Christian_Dahlqvist , let me try that one.

hi @Christian_Dahlqvist

I have configured same file located in /data/etc/elasticsearch/elasticsearch.yml and restarted the es also but still facing same issue

That is not the path I gave. Are you sure this is the correct location?

yes @Christian_Dahlqvist

now its fine , but now facing another exception
type":"exception","reason":"failed to create blob container","caused_by":{"type":"access_denied_exception","reason":"/home/tf-java4/Desktop/esbackup/tests-T3LGVeMNT7CcwFSOgOTIlg"

Does the elasticsearch user have read and write access to that directory?

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