Having trouble creating Elasticsearch Snapshot Repository

I want to create snapshot repository in order to backup elasticsearch indices locally. However I am getting error messages, I think I am not giving correct path in location. I have posted screenshots for better explanation.


This is my docker-compose yaml file

and this is elasticsearch configuration file. I get the following error

I am following this link for setting up my repository. Any suggestion would be of great help.
I am a bit new to elasticsearch so pardon my ignorance

Welcome to our community! :smiley:

Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them :slight_smile:

1 Like

Hi Warkolm,
What is the possible way to keep backup of index data and restore it later. I think Yash is trying to use ELK service via docker container.

1 Like

Snapshot and restore is the best.

Hi Warkolm,
We know that is the best solution, can you provide some reference link or some github repos for this snapshot restore solution using docker-compose file because we are getting error in the docker file as mentioned in the screenshot above.

As far as I can see the error indicates a syntax error in the configuration for the first volume.

Hi Christian,
Are you talking about /mnt/data/collab/backup: /usr/share/elasticsearch/backup ? Here /mnt/data/collab/backup is the directory created by us.

Hi Chistian,
Thank you for pointing that out, I have changed the yaml file and provided the path.repo under environment.
"
environment:
path.repo: /mnt/data/collab/backup_repo
"
While running the docker services it says Access denied, the following is the error message

"
java.lang.IllegalStateException: Unable to access 'path.repo' (/mnt/data/collab/backup_repo)
Likely root cause: java.nio.file.AccessDeniedException: /mnt/data
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
"
I have already provided root access to the "backup_repo" folder

drwxrwxrwx 2 root root 4096 Aug 16 00:17 backup_repo

Can you help to resolve it.

Hello,
First of all: please use code tag for code/configs.

Secondly: you gave permissions to directory at all nodes? Is at all node path.repo the same path?
In error stack you got:

Likely root cause: java.nio.file.AccessDeniedException: /mnt/data

Are permissions ok for this directory?
Could you please do:

ls -lah /mnt/data

?

Hi,
We are using 1 node of elasticsearch only and given- path.repo: ["/mnt/data/collab/backup_repo"] in elasticsearch.yml
As mentioned the path has read and write access:

ls -lah /mnt/data/
drwxrwxrwx 3 root root 4.0K Jul 19 01:29 .
drwxrwxrwx 3 root root 4.0K Jul 19 00:31 ..
drwxrwxrwx 14 root root 4.0K Aug 18 01:24 collab

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