# Make a copy of a running Elastic node

**URL:** https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448
**Category:** Elasticsearch
**Created:** [February 1, 2023, 3:01pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448 "2023-02-01T15:01:59Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![tmslara.a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tmslara.a/32/116339_2.png) [@tmslara.a](https://discuss.elastic.co/u/tmslara.a)
#### Post date: [February 1, 2023, 3:01pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/1 "2023-02-01T15:01:59Z")

</div>

Hi,

I have a running Elastic node with an index. I'm constantly inserting documents into the index in a process that I can't stop. The whole process is running in a remote server.

I need to make a copy of the index into my local machine in order to experiment with the data, just the data, I don't need to have any interaction with the original process after making the copy. The idea is that I need just to make an instant copy without touching the remote server process in any way since it a critical indexing process.

Is it possible to copy a instantaneous snapshot from the index into my local machine?

Best regards.

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [February 1, 2023, 5:52pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/2 "2023-02-01T17:52:18Z")

</div>

> [@tmslara.a](#):
>
> Is it possible to copy a instantaneous snapshot from the index into my local machine?

Yes, that's what [snapshot and restore](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html) is all about.

> [@tmslara.a](#):
>
> without touching the remote server process in any way

That's not a reasonable constraint, you will have to touch it to get the data out of it. But taking a snapshot should not be disruptive.

---

<div class="post-metadata">

### Author: ![tmslara.a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tmslara.a/32/116339_2.png) [@tmslara.a](https://discuss.elastic.co/u/tmslara.a)
#### Post date: [February 1, 2023, 6:12pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/3 "2023-02-01T18:12:22Z")

</div>

Thank you for your answers. A couple of questions about them.

> [@DavidTurner](#):
>
> Yes, that's what [snapshot and restore](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html) is all about.

Regarding snapshot and restore. Let me put it this way. I have an external server running an Elasticsearch process, call it external\_process. I'm constantly ingesting new data into external\_process's index (let's say 100 documents per minute). Snapshot and restore allows me to take a copy from external\_process's index into my local machine without interrupting the ingestion of data? Sorry if you already explain this but keeping the process running is very important for me 😅

> [@DavidTurner](#):
>
> That's not a reasonable constraint, you will have to touch it to get the data out of it. But taking a snapshot should not be disruptive.

By 'not be disruptive' do you mean that the ingestion of data will not be interrupted?

Thanks

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [February 1, 2023, 6:14pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/4 "2023-02-01T18:14:20Z")

</div>

> [@tmslara.a](#):
>
> By 'not be disruptive' do you mean that the ingestion of data will not be interrupted?

Yes that's right

---

<div class="post-metadata">

### Author: ![tmslara.a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tmslara.a/32/116339_2.png) [@tmslara.a](https://discuss.elastic.co/u/tmslara.a)
#### Post date: [February 1, 2023, 7:48pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/5 "2023-02-01T19:48:30Z")

</div>

Thanks. I'm starting to understand the procedure of using snapshots. As far as I understand, to create a snapshot I need to previously have created and registered a snapshot repository. Doing this (following the procedure defined [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/put-snapshot-repo-api.html)), I encounter a problem, since elastic returns an error indicating that my location does not match any location in path.repo (in elasticsearch.yml).

As a test, I created an elastic process in another host, configuring path.repo, and I managed to register the snapshot repository correctly. However, I didn't configure the value of path.repo on my remote Elastic before starting it. Since I can't restart this remote Elastic I wonder if it is possible to configure the snapshot repository without stopping the process. At the time I haven't found an alternative manner.

Any insights will be very appreciated.

---

<div class="post-metadata">

### Author: ![tmslara.a](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tmslara.a/32/116339_2.png) [@tmslara.a](https://discuss.elastic.co/u/tmslara.a)
#### Post date: [February 1, 2023, 8:03pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/6 "2023-02-01T20:03:46Z")

</div>

Is it possible to use the \_reindex API?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [February 1, 2023, 8:22pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/7 "2023-02-01T20:22:19Z")

</div>

> [@tmslara.a](#):
>
> Since I can't restart this remote Elastic I wonder if it is possible to configure the snapshot repository without stopping the process. At the time I haven't found an alternative manner.

It is not possible, to add a shared file-system repository you need to restart the node, also the `path.repo` of both nodes needs to be the same shared file system.

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [February 1, 2023, 8:40pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/8 "2023-02-01T20:40:35Z")

</div>

> [@tmslara.a](#):
>
> I wonder if it is possible to configure the snapshot repository without stopping the process.

Not exactly. But you can do a reconfiguration like this without downtime if you introduce another two nodes into your cluster. Given how important it is to you that this indexing process does not stop, you really do need multiple nodes. See [desigining for resilience](https://www.elastic.co/guide/en/elasticsearch/reference/current/high-availability-cluster-design.html) for more information about setting up a HA cluster.

I think you can set up a repository on S3 or similar without needing to restart tho.

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [February 1, 2023, 9:02pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/9 "2023-02-01T21:02:49Z")

</div>

> [@DavidTurner](#):
>
> I think you can set up a repository on S3 or similar without needing to restart tho.

I think it would depend on the version, on version 8.X the repositories plugins are built-in so there is no need to install them.

On version 7.X the repositories plugins need to be installed, which would need a restart.

---

<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: [March 1, 2023, 9:03pm UTC](https://discuss.elastic.co/t/make-a-copy-of-a-running-elastic-node/324448/10 "2023-03-01T21:03:06Z")

</div>

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