<p>ElasticSearch can backup itself when told to do so via an API call.
You just need to configure a destination, and optionally credentials, for example you make ElasticSearch create snapshots of its database in AWS S3.</p>

<p><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html</a></p>

<p>You can also automate these calls using a schedule with the Elastic <code>curator</code> tool.</p>

<p><a href="https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/snapshot.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/snapshot.html</a></p>

CC BY-SA 4.0
2018-09-01T17:09:06.530Z
The whole point of this question was to find a method to backup a running instance without shutting it down. As far as I can tell that is not at all possible with an unconfigured instance that has no repos if you try to do snapshots. My takeaway from this was that it was super important to configure the helm chart we used to have a backing volume. We finally got the resources cleared and before that we just couldn't expect to have our data long term. Our first non-persistant deploy was still useful as a POC.
David West
CC BY-SA 4.0
2018-09-01T22:26:21.730Z
As far as I know, you can always configure a destination in ElasticSearch after the fact ... it is an API call.
Evgeny Zislis
CC BY-SA 4.0
2018-08-30T18:16:48.907Z
2018-08-30T18:16:48.907Z
Evgeny Zislis
<p>I have an installation of Elasticsearch without persistence running and I need to back it up so we can move it to a persistent setup.</p>

<p>What are safe ways to do this and keep the data in the ES database?</p>

<p>It is running and I want to avoid shutting it down.</p>

<p>It is running in a container and I think the entrypoint starts the server. So stopping the cluster my stop my pod and get rid of all my data...</p>

CC BY-SA 4.0
2018-08-30T15:22:34.177Z
Maybe https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Tensibai
CC BY-SA 4.0
2018-08-30T16:59:56.113Z
@Tensibai it looks like you need to define repos to do this and that seems to require restarting the cluster...
David West
CC BY-SA 4.0
2018-08-30T18:04:44.140Z
I don't understand why you think that, you do a put request to create a local (in container) repo, another put to create the snapshot and then docker cp this location to host, shut you cluster down, bring it back up with volume mounts or whatever, docker cp to container and restore the snapshot...
Tensibai
CC BY-SA 4.0
2018-09-01T17:07:36.373Z
@Tensibai we just moved our cluster. we did not back up the data and just took the loss. now it has persistance. The whole reason we couldn't use snapshots was because that required shutting the cluster down and bringing that back up. With our setup that got rid of the data :)
David West
CC BY-SA 4.0
2018-09-01T21:50:03.630Z
You're not willing to accept that a snapshot can be take locally to the container and then copied with docker commands. We can't do anything more for you
Tensibai
CC BY-SA 4.0
2018-09-01T21:51:43.883Z
You can't create a remote repo as S3, but local disk is always available, you need to target one node of the cluster to find the snap after, but well...
Tensibai
CC BY-SA 4.0
2018-09-01T22:28:23.223Z
@DavidWest "snapshots required shutting the cluster down" ... it is wrong, it requires no such thing.
Evgeny Zislis
<elastic>
Backing up an ephemeral Elasticsearch installation
David West
# Backing up an ephemeral Elasticsearch installation

(Asked by: username_0 on 2018-08-30)

I have an installation of Elasticsearch without persistence running and I need to back it up so we can move it to a persistent setup.

What are safe ways to do this and keep the data in the ES database?

It is running and I want to avoid shutting it down.

It is running in a container and I think the entrypoint starts the server. So stopping the cluster my stop my pod and get rid of all my data...

**Tags:** elastic

> **Comments:**
> **username_1**: Maybe https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html  
> **username_0**: @username_1 it looks like you need to define repos to do this and that seems to require restarting the cluster...  
> **username_1**: I don't understand why you think that, you do a put request to create a local (in container) repo, another put to create the snapshot and then docker cp this location to host, shut you cluster down, bring it back up with volume mounts or whatever, docker cp to container and restore the snapshot...  
> **username_0**: @username_1 we just moved our cluster. we did not back up the data and just took the loss. now it has persistance. The whole reason we couldn't use snapshots was because that required shutting the cluster down and bringing that back up. With our setup that got rid of the data :)  
> **username_1**: You're not willing to accept that a snapshot can be take locally to the container and then copied with docker commands. We can't do anything more for you  
> **username_1**: You can't create a remote repo as S3, but local disk is always available, you need to target one node of the cluster to find the snap after, but well...  
> **username_2**: @DavidWest "snapshots required shutting the cluster down" ... it is wrong, it requires no such thing.  

---

## 1 answers

### Answer by username_2 on 2018-08-30. Score: 1

ElasticSearch can backup itself when told to do so via an API call.
You just need to configure a destination, and optionally credentials, for example you make ElasticSearch create snapshots of its database in AWS S3.

<https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>

You can also automate these calls using a schedule with the Elastic `curator` tool.

<https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/snapshot.html>

> **Comments:**
> **username_0**: The whole point of this question was to find a method to backup a running instance without shutting it down. As far as I can tell that is not at all possible with an unconfigured instance that has no repos if you try to do snapshots. My takeaway from this was that it was super important to configure the helm chart we used to have a backing volume. We finally got the resources cleared and before that we just couldn't expect to have our data long term. Our first non-persistant deploy was still useful as a POC.  
> **username_2**: As far as I know, you can always configure a destination in ElasticSearch after the fact ... it is an API call.  

---

