# Error when I create a snapshot

**URL:** <https://discuss.elastic.co/t/error-when-i-create-a-snapshot/161991>\
**Category:** Elasticsearch\
**Created:** [December 24, 2018, 9:37am UTC](https://discuss.elastic.co/t/error-when-i-create-a-snapshot/161991 "2018-12-24T09:37:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [December 24, 2018, 9:37am UTC](https://discuss.elastic.co/t/error-when-i-create-a-snapshot/161991/1 "2018-12-24T09:37:06Z")

</div>

Hi everyone !  
Before upgrading my stack, I would like to create snapshot of my indices.

My configuration is :  
4 nodes (2 master, 2 data)  
6.4.2 version

I have created a folder on the network, it's mounted on each node with nfs.

On each node I have this :

```
df -h
172.21.2.128:/nfs_elk 97G 608K 97G 1% /mnt/snapshot_elk 

```

In each file elasticsearch.yml, I have this :

```
path.repo: ["/mnt/snapshot_elk/elk-ludo"]

```

When I run the command to create the folder, I have this :

```
 PUT /_snapshot/snapfolder_elkludo
 {
"type": "fs",
"settings": {
    "location": "/mnt/snapshot_elk/elk-ludo/",
    "compress": true
}
}

```

===\>

```
    {
  "error": {
"root_cause": [
  {
    "type": "repository_verification_exception",
    "reason": "[snapfolder_elkludo] [[bA2LzpSzT4eiHsYcctR1FA, 
	'RemoteTransportException[[tlinf006][172.20.2.32:9300] [internal:admin/repository/verify]]; 
	nested: RepositoryVerificationException[[snapfolder_elkludo] store location [/mnt/snapshot_elk/elk-ludo] 
	is not accessible on the node [{tlinf006}{bA2LzpSzT4eiHsYcctR1FA}{eI5E3XYHR-qK67CBIfz0ow}
	{172.20.2.32}{172.20.2.32:9300}{ml.machine_memory=3974455296, xpack.installed=true, ml.max_open_jobs=20, 
	ml.enabled=true}]]; nested: AccessDeniedException[/mnt/snapshot_elk/elk-ludo/tests-7p69a_5gTBq8toglCGjZeg/data-bA2LzpSzT4eiHsYcctR1FA.dat];'], 
	[lqfyvJyGQaSLhZ3-ex8rLA,

```

tlinf006 is on of the node of my cluster. I dont understand this message because, this server has the path mounted by nfs, I can browse it and I can write inside.

When I run this :

```
 sudo -u elasticsearch touch /mnt/snapshot_elk/elk-ludo/test

```

It's OK

the folder "/mnt/snapshot\_elk/" has 777.

So what's the problem with my configuration ?

Thanks for your help

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [December 24, 2018, 2:22pm UTC](https://discuss.elastic.co/t/error-when-i-create-a-snapshot/161991/2 "2018-12-24T14:22:26Z")

</div>

Problem solved !!

I have noticed elasticsearch user and group had a different id on each node of the cluster.  
The group id and the user id has to be the same.

If you have different user and group id, you have to change like this

read and note the group id and user id of elasticsearch in /etc/passwd and /etc/group

```
stop elasticsearch service

```

change the id by 1412 for example)

```
usermod -u 1412 elasticsearch
groupmod -g 1412 elasticsearch

```

find the files with the old (986 and 990 for me) id and replace by elasticsearch

```
find / -group 986 -exec chgrp -h elasticsearch {} \;
find / -user 990 -exec chown -h elasticsearch {} \;

restart elasticsearch service

```

Do this on each node.

---

<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 21, 2019, 2:22pm UTC](https://discuss.elastic.co/t/error-when-i-create-a-snapshot/161991/3 "2019-01-21T14:22:30Z")

</div>

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