# Need help in elasticsearch snapshot

**URL:** <https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605>\
**Category:** Elasticsearch\
**Tags:** slm-snapshot-lifecycle-management\
**Created:** [September 23, 2020, 4:48am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605 "2020-09-23T04:48:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kasim123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kasim123/32/58684_2.png) [@kasim123](https://discuss.elastic.co/u/kasim123)\
**Post date:** [September 23, 2020, 4:48am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/1 "2020-09-23T04:48:32Z")

</div>

Hi Team,

I am planning to migrate data from one cluster to another cluster by taking snapshot of indices. In current k8s cluster, I do not have shared storage which is needed to define repo location. We are using rook-ceph block storage for elasticsearch cluster.

My first question, is shared path necessary for taking snapshot?

Second question is, can i use one PVC with ReadWriteMany with 3 elasticsearch sts objects? If yes, how would i define addition pvc information in values.yaml. I already defined `volumeClaimTemplate:` template in values.yaml.

```auto
volumeClaimTemplate:
  accessModes: ["ReadWriteOnce"]
  storageClassName: "rook-ceph-block"
  resources:
    requests:
      storage: 200Gi

```

I appreciate if anybody could help me out in this regard.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 23, 2020, 4:50am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/2 "2020-09-23T04:50:03Z")

</div>

> [@kasim123](#):
>
> My first question, is shared path necessary for taking snapshot?

Yes.

I can't answer your second one sorry.

---

<div class="post-metadata">

**Author:** ![kasim123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kasim123/32/58684_2.png) [@kasim123](https://discuss.elastic.co/u/kasim123)\
**Post date:** [September 23, 2020, 5:12am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/3 "2020-09-23T05:12:59Z")

</div>

Thanks for your reply. If use shared path and take the snapshot, is snapshot taken from each elasticsearch pod ( I have 3 replicas of elasticsearch pods) or it is taken only from only one pod?

Thanks,  
Kasim

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 23, 2020, 5:14am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/4 "2020-09-23T05:14:36Z")

</div>

Snapshots are taken on each node that holds data that is part of the indices being snapshotted.

---

<div class="post-metadata">

**Author:** ![kasim123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kasim123/32/58684_2.png) [@kasim123](https://discuss.elastic.co/u/kasim123)\
**Post date:** [September 23, 2020, 5:24am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/5 "2020-09-23T05:24:59Z")

</div>

okay, if I define one path in esconfig.yaml file like ` path.repo: ["/es-backup"]`, then each pod sanpshot would be stored under /es-backup path. When other pods of ealsticsearch initiates the snapshot, would that not overwrite existing snapshot? I am clear with the snapshot concept. Could you explain me clearly

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 23, 2020, 5:28am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/6 "2020-09-23T05:28:07Z")

</div>

Each node only snapshots the data that it has, so there won't be anything overwritten.

---

<div class="post-metadata">

**Author:** ![kasim123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kasim123/32/58684_2.png) [@kasim123](https://discuss.elastic.co/u/kasim123)\
**Post date:** [September 23, 2020, 5:36am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/7 "2020-09-23T05:36:05Z")

</div>

for example, as I defined path.repo, each node creates separate folder under /es-backup and stores the snapshot. Am i right ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 23, 2020, 5:36am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/8 "2020-09-23T05:36:52Z")

</div>

Not exactly. There are directories created that map to the index structure. Then each node puts the data from the shards it holds into that structure.

---

<div class="post-metadata">

**Author:** ![kasim123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kasim123/32/58684_2.png) [@kasim123](https://discuss.elastic.co/u/kasim123)\
**Post date:** [September 23, 2020, 5:41am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/9 "2020-09-23T05:41:44Z")

</div>

so, all nodes stores the snapshot under `/es-backup`.

---

<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:** [October 21, 2020, 5:41am UTC](https://discuss.elastic.co/t/need-help-in-elasticsearch-snapshot/249605/10 "2020-10-21T05:41:54Z")

</div>

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