# Backup of Elasticsearch using velero

**URL:** <https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408>\
**Category:** Elasticsearch\
**Created:** [June 9, 2020, 6:51pm UTC](https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408 "2020-06-09T18:51:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajashree\_Sekar](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Rajashree\_Sekar](https://discuss.elastic.co/u/Rajashree_Sekar)\
**Post date:** [June 9, 2020, 6:51pm UTC](https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408/1 "2020-06-09T18:51:02Z")

</div>

Hi Team,

I'm running Elastic search cluster in k8s environment. And I'm using Velero and restic for the backup and restore.

But I'm not able to backup the elastic search cluster, as I could not freeze the volume using fsfreeze(which runs as pre-hook before backup)

Error:  
`stderr: fsfreeze: (opts & 1) ? FIFREEZE : FITHAW: Operation not permitted\n" backup=es-system/backup-namespace-20200609170614 group=v1 hookCommand="[fsfreeze --freeze /usr/share/elasticsearch/data]" hookContainer=fsfreeze hookName="<from-annotation>" hookOnError=Fail hookPhase=pre hookSource=annotation hookTimeout="{30s}" hookType=exec logSource="pkg/podexec/pod_command_executor.go:172" name=elasticsearch-master-1 namespace=elk resource=pods`

Would you please help me how to achieve the freeze of Volume?

Thanks  
Rajashree

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 9, 2020, 6:56pm UTC](https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408/2 "2020-06-09T18:56:29Z")

</div>

The only supported way to backup Elasticsearch is via the [snapshot and restore APIs](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html). File system level backups are not guaranteed to work at all, so relying on this is very risky.

---

<div class="post-metadata">

**Author:** ![Rajashree\_Sekar](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Rajashree\_Sekar](https://discuss.elastic.co/u/Rajashree_Sekar)\
**Post date:** [June 10, 2020, 3:21pm UTC](https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408/3 "2020-06-10T15:21:32Z")

</div>

I would like to know is there any in-built command for quiesce/unquiesce elastic search. There should be some way to do it right? I'm just one step behind, could you please help me?

Thanks in Advance!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 10, 2020, 3:51pm UTC](https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408/4 "2020-06-10T15:51:37Z")

</div>

If you use the snapshot api you can back up while the cluster is running.

---

<div class="post-metadata">

**Author:** ![Rajashree\_Sekar](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Rajashree\_Sekar](https://discuss.elastic.co/u/Rajashree_Sekar)\
**Post date:** [June 10, 2020, 4:21pm UTC](https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408/5 "2020-06-10T16:21:27Z")

</div>

I wanted to take backup on Minio (on-premise storage solution) would that be possible?

Thanks in Advance!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 10, 2020, 4:33pm UTC](https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408/6 "2020-06-10T16:33:56Z")

</div>

Yes, I think you can use the S3 repository plugin with Minio.

---

<div class="post-metadata">

**Author:** ![Rajashree\_Sekar](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Rajashree\_Sekar](https://discuss.elastic.co/u/Rajashree_Sekar)\
**Post date:** [June 10, 2020, 4:46pm UTC](https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408/7 "2020-06-10T16:46:05Z")

</div>

Hi Christian,

My elasticsearch is running inside a Kubernetes cluster. How would I install that S3 plugin to that docker image?

Thanks in Advance!

---

<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:** [July 8, 2020, 4:46pm UTC](https://discuss.elastic.co/t/backup-of-elasticsearch-using-velero/236408/8 "2020-07-08T16:46:11Z")

</div>

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