# Elasticsearch snapshot and recovery

**URL:** https://discuss.elastic.co/t/elasticsearch-snapshot-and-recovery/353668
**Category:** Elasticsearch
**Tags:** snapshot-and-restore
**Created:** [February 20, 2024, 9:49am UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-and-recovery/353668 "2024-02-20T09:49:51Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![tykarthick](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@tykarthick](https://discuss.elastic.co/u/tykarthick)
#### Post date: [February 20, 2024, 9:49am UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-and-recovery/353668/1 "2024-02-20T09:49:51Z")

</div>

Hi Team,

Am using Elasticsearch three node cluster with version 8.6.2 and hosted on a Linux environment. Doing a POC in Snapshot and Recovery and external NFS storage is configured to store the snapshots. The NFS repo is 250 GB.

1. The snapshot was successful when I use the below command and could see the metadata files were created under the destination NFS storage.

curl -XPUT '[http://cl-elastic-prf.snapshot.com:9200/\_snapshot/testnfsrepo/test-snapshot?wait\_for\_completion=true'](http://cl-elastic.snapshot.com:9200/_snapshot/testnfsrepo/test-snapshot?wait_for_completion=true')

1. Whereas, the snapshot got failed when I use the below command and could see error message related to “Failed to create blob container or Access denied exception”

curl -XPUT -k --user "elastic:xxxxxxxxxxxxxxx-" '[http://cl-elastic-prf.snapshot.com:9200/\_snapshot/testnfsrepo/test-snapshot?wait\_for\_completion=true](http://cl-elastic-prf.snapshot.com:9200/_snapshot/testnfsrepo/test-snapshot?wait_for_completion=true)'

1. This is the similar case for SLM policy, when I schedule a SLM policy without the user credentials the snapshot was successful as per the policy schedule and no error messages but when I try schedule a SLM policy with user credentials as user elastic as mentioned above but the snapshot got failed with exceptions “Failed to create blob container or Access denied exception”.

**Exception:**

Caused by: java.nio.file.AccessDeniedException: /etc/middleware/indices/8GVR\_UIGQ6WDcBklYUpcrw  
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]  
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:397) ~[?:?]  
at java.nio.file.Files.createDirectory(Files.java:700) ~[?:?]  
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:807) ~[?:?]  
at java.nio.file.Files.createDirectories(Files.java:793) ~[?:?]  
at org.elasticsearch.common.blobstore.fs.FsBlobStore.buildAndCreate(FsBlobStore.java:68) ~[elasticsearch-8.6.2.jar:?]  
at org.elasticsearch.common.blobstore.fs.FsBlobStore.blobContainer(FsBlobStore.java:54) ~[elasticsearch-8.6.2.jar:?]  
... 8 more  
Caused by: java.nio.file.AccessDeniedException: /etc/middleware/indices/VSBpGoTdRa-uXxYyhyGj0g  
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]

Just wanted to know,

1. what is the best practice to schedule the SLM policy whether scheduling them with user credentials or without user credentials.
2. Also, whether the restoration will work fine if I schedule the SLM policy without credentials as in my case I just triggered the snapshot without credentials and worked fine but yet to try the restoration part.

---

<div class="post-metadata">

### Author: ![tykarthick](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@tykarthick](https://discuss.elastic.co/u/tykarthick)
#### Post date: [February 22, 2024, 7:51am UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-and-recovery/353668/2 "2024-02-22T07:51:11Z")

</div>

Hi Team,

Can anyone help on this issue please?

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [February 22, 2024, 9:09am UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-and-recovery/353668/3 "2024-02-22T09:09:39Z")

</div>

> [@tykarthick](#):
>
> `java.nio.file.AccessDeniedException: /etc/middleware/indices/VSBpGoTdRa-uXxYyhyGj0g`

This exception is because your OS is returning some error code (probably `EPERM`) when Elasticsearch tries to create this directory. It's nothing to do with SLM or user credentials, it's a system issue.

---

<div class="post-metadata">

### Author: ![tykarthick](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@tykarthick](https://discuss.elastic.co/u/tykarthick)
#### Post date: [February 22, 2024, 10:00am UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-and-recovery/353668/4 "2024-02-22T10:00:22Z")

</div>

Hi David,

Thanks for the update.

Just wanted to know,

1. what is the best practice to schedule the SLM policy whether scheduling them with user credentials or without user credentials.
2. Also, whether the restoration will work fine if I schedule the SLM policy without credentials as in my case I just triggered the snapshot without credentials and worked fine but yet to try the restoration part.

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [February 22, 2024, 10:12am UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-and-recovery/353668/5 "2024-02-22T10:12:55Z")

</div>

I don't know, sorry. I guess the best practice is to do the one which works?

---

<div class="post-metadata">

### Author: ![tykarthick](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@tykarthick](https://discuss.elastic.co/u/tykarthick)
#### Post date: [February 22, 2024, 10:20am UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-and-recovery/353668/6 "2024-02-22T10:20:12Z")

</div>

Thanks David

---

<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: [March 21, 2024, 10:20am UTC](https://discuss.elastic.co/t/elasticsearch-snapshot-and-recovery/353668/7 "2024-03-21T10:20:18Z")

</div>

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