# How to backup/restore?

**URL:** <https://discuss.elastic.co/t/how-to-backup-restore/194541>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [August 9, 2019, 5:17am UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541 "2019-08-09T05:17:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tew](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tew/32/64104_2.png) [@tew](https://discuss.elastic.co/u/tew)\
**Post date:** [August 9, 2019, 5:17am UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/1 "2019-08-09T05:17:48Z")

</div>

I installed the elasticsearch operator using the quickstart guide and have a 3 node cluster running. I can't find any documentation on how to schedule regular snapshots of the ES cluster or how to restore from snapshot.

Can someone point me to a doc or guide for backup/restore?

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [August 9, 2019, 6:18am UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/2 "2019-08-09T06:18:07Z")

</div>

[https://www.elastic.co/guide/en/cloud-on-k8s/0.9/k8s-snapshot.html](https://www.elastic.co/guide/en/cloud-on-k8s/0.9/k8s-snapshot.html)

---

<div class="post-metadata">

**Author:** ![tew](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tew/32/64104_2.png) [@tew](https://discuss.elastic.co/u/tew)\
**Post date:** [August 9, 2019, 6:32am UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/3 "2019-08-09T06:32:13Z")

</div>

Thank you! Loving the ECK operator so far!

---

<div class="post-metadata">

**Author:** ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)\
**Post date:** [September 9, 2020, 8:09pm UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/4 "2020-09-09T20:09:17Z")

</div>

Did this go away in 1.1? I don't see the documentation.

---

<div class="post-metadata">

**Author:** ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)\
**Post date:** [September 9, 2020, 8:10pm UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/5 "2020-09-09T20:10:47Z")

</div>

And do you know where there is documentation for setting up a vanilla Kubernetes pvc as the backup volume?

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [September 9, 2020, 8:35pm UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/6 "2020-09-09T20:35:16Z")

</div>

We restructured the docs slightly it is now here: [https://www.elastic.co/guide/en/cloud-on-k8s/1.2/k8s-snapshots.html](https://www.elastic.co/guide/en/cloud-on-k8s/1.2/k8s-snapshots.html)

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [September 9, 2020, 8:48pm UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/7 "2020-09-09T20:48:30Z")

</div>

> [@data\_smith](#):
>
> And do you know where there is documentation for setting up a vanilla Kubernetes pvc as the backup volume?

I am not sure what you mean by "vanilla Kubernetes pvc". If you are referring to running on vanilla Kubernetes i.e. not on one of the hosted k8s offerings, then you still have multiple options to choose from:

- you could use shared filesystem as mentioned here [Register a snapshot repository | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html#snapshots-filesystem-repository) for that you would need a persistent volume of a storage class that supports [ReadWriteMany](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) access type, e.g. NFS or some other network attached storage that supports that access mode and can be mounted into all of your Elasticsearch Pods. The important point here is that it is mounted to all your ES pods so that every ES node can write its part of the snapshot that excludes any local volumes types as an option.
- ignoring the PVC part for a moment you could also use the [S3 Repository Plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/7.9/repository-s3.html) either against Amazon S3 or something that implements the S3 API like [Minio](https://min.io/) for example which is typically easier than using a shared filesystem.

---

<div class="post-metadata">

**Author:** ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)\
**Post date:** [September 9, 2020, 9:21pm UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/8 "2020-09-09T21:21:22Z")

</div>

Yes a pvc in a vanilla Kubernetes. I'm mounting a pvc for backup and I get errors in the logs: 'elastic operator security index is unavailable short circuiting retrieval of user elastic'.  
I don't get this error when I don't add the volume and volumeMount for the snapshot.  
So I was looking to see if there was some documentation of the proper way to do this. I saw before 1.0 of ECK you had to supply some labels. Is there anything like that for versions ECK 1.1+?

I'm very familiar with all the settings - something's not right with the ECK operator. When I don't include the volume and volumeMount in spec everything is ok. When I do include it I get errors saying the .security index wasn't able to be created. The elastic cluster is green and I can query it - just no indexes are created.

---

<div class="post-metadata">

**Author:** ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)\
**Post date:** [September 9, 2020, 9:32pm UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/9 "2020-09-09T21:32:09Z")

</div>

My mistake. I have some other problem unrelated to pvcs. Thanks for responding.

---

<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:** [November 4, 2022, 7:20am UTC](https://discuss.elastic.co/t/how-to-backup-restore/194541/10 "2022-11-04T07:20:40Z")

</div>


