# Why are we told to copy the data folder when upgrading?

**URL:** https://discuss.elastic.co/t/why-are-we-told-to-copy-the-data-folder-when-upgrading/168951
**Category:** Elasticsearch
**Created:** [February 19, 2019, 7:23am UTC](https://discuss.elastic.co/t/why-are-we-told-to-copy-the-data-folder-when-upgrading/168951 "2019-02-19T07:23:54Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![gyau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyau/32/37824_2.png) [@gyau](https://discuss.elastic.co/u/gyau)
#### Post date: [February 19, 2019, 7:23am UTC](https://discuss.elastic.co/t/why-are-we-told-to-copy-the-data-folder-when-upgrading/168951/1 "2019-02-19T07:23:54Z")

</div>

I was reading the [snapshot and restore section](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html) from the documentation and it said that it isn't recommended to just copy and paste the folder because there might be some data loss.

> It is not possible to back up an Elasticsearch cluster simply by taking a copy of the data directories of all of its nodes. Elasticsearch may be making changes to the contents of its data directories while it is running, and this means that copying its data directories cannot be expected to capture a consistent picture of their contents. Attempts to restore a cluster from such a backup may fail, reporting corruption and/or missing files, or may appear to have succeeded having silently lost some of its data. The only reliable way to back up a cluster is by using the snapshot and restore functionality.

However, the [standard upgrade](https://www.elastic.co/guide/en/kibana/6.5/upgrade-standard.html) section says the following:

> Copy the files from the `data` directory from your old installation to your new installation

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 19, 2019, 7:24am UTC](https://discuss.elastic.co/t/why-are-we-told-to-copy-the-data-folder-when-upgrading/168951/2 "2019-02-19T07:24:53Z")

</div>

Can you link to the specific sections of the docs you are seeing this?

---

<div class="post-metadata">

### Author: ![gyau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyau/32/37824_2.png) [@gyau](https://discuss.elastic.co/u/gyau)
#### Post date: [February 19, 2019, 7:25am UTC](https://discuss.elastic.co/t/why-are-we-told-to-copy-the-data-folder-when-upgrading/168951/3 "2019-02-19T07:25:44Z")

</div>

I just added the link on the question

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 19, 2019, 7:27am UTC](https://discuss.elastic.co/t/why-are-we-told-to-copy-the-data-folder-when-upgrading/168951/4 "2019-02-19T07:27:22Z")

</div>

The first link is for Elasticsearch, the second is for Kibana. So they have different approaches.

---

<div class="post-metadata">

### Author: ![gyau](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyau/32/37824_2.png) [@gyau](https://discuss.elastic.co/u/gyau)
#### Post date: [February 19, 2019, 7:32am UTC](https://discuss.elastic.co/t/why-are-we-told-to-copy-the-data-folder-when-upgrading/168951/5 "2019-02-19T07:32:46Z")

</div>

I'm sorry, I didn't check 😓  
Thank you~

---

<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 19, 2019, 7:32am UTC](https://discuss.elastic.co/t/why-are-we-told-to-copy-the-data-folder-when-upgrading/168951/6 "2019-03-19T07:32:47Z")

</div>

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