# Backup logs

**URL:** <https://discuss.elastic.co/t/backup-logs/197069>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [August 28, 2019, 8:42am UTC](https://discuss.elastic.co/t/backup-logs/197069 "2019-08-28T08:42:46Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mindsinthecloud](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mindsinthecloud](https://discuss.elastic.co/u/mindsinthecloud)\
**Post date:** [August 29, 2019, 2:21am UTC](https://discuss.elastic.co/t/backup-logs/197069/4 "2019-08-29T02:21:56Z")

</div>

> [@pebrc](#):
>
> You can configure a snapshot repository to backup your data to a shared filesystem you have mounted on your k8s hosts for example. It is probably less useful to backup to the same filesystem where your Elasticsearch data directories reside: it does not add much in terms of failure resiliency and creates only more I/O on the filesystem Elasticsearch is using.

Thanks for pointing this out, I did think of putting the data dir and repository in the same shared filesystem. I should probably set the repository in another filesystem. Am I right to say that as long as I have my PV retained, ECK will pick up the data when it claims it, so its sort of like a backup since my PV is retained in a shared filesystem?  
And may I also ask if there's any method to reclaim my PV if the elasticsearch went down and I have to reapply again? Because ECK is not deployed in Statefulset and thus it will not be able to reclaim the released PV, and manual intervention is required.

> [@pebrc](#):
>
> The process is not explicitly documented for ECK because the approach is the same as for Elasticsearch clusters running outside of Kubernete

If I am using my own CephFS, I can just ignore the storage plugin and adapt the approach for the steps in modules-snapshots and thereafter, create a k8s CronJob with this example: [Create automated snapshots | Elastic Cloud on Kubernetes [0.9] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/0.9/k8s-snapshot.html#k8s-setup-cronjob) , is that right? However, i am not quite sure how I can do a PUT and create a repository in my ECK. Is there any objects to call on my elasticsearch.yaml?

Apologies for the multiple questions. Im still trying to understand more on ECK. Hope you can help me understand better 🙂

> [@elasticforme](#):
>
> I have a script that does automatic backup via unix cron. I have posted that script few month back. search on it if you like to do it via cron.

[Automatic Elasticsearch snapshot backup](https://discuss.elastic.co/t/automatic-elasticsearch-snapshot-backup/173223) found it. thanks!

---

_[View the full topic](https://discuss.elastic.co/t/backup-logs/197069)._
