# How to copy all ES indexes from one location to another

**URL:** <https://discuss.elastic.co/t/how-to-copy-all-es-indexes-from-one-location-to-another/8380>\
**Category:** Elasticsearch\
**Created:** [July 10, 2012, 9:57pm UTC](https://discuss.elastic.co/t/how-to-copy-all-es-indexes-from-one-location-to-another/8380 "2012-07-10T21:57:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![T\_Vinod\_Gupta](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@T\_Vinod\_Gupta](https://discuss.elastic.co/u/T_Vinod_Gupta)\
**Post date:** [July 10, 2012, 9:57pm UTC](https://discuss.elastic.co/t/how-to-copy-all-es-indexes-from-one-location-to-another/8380/1 "2012-07-10T21:57:49Z")

</div>

hi,  
whats the best way to copy all the ES indexes in my node to another mounted  
drive, lets say?

my filesystem on which ES installation, data and log files are present got  
corrupted. i want to unmount and run fsck on it and i dont know how long it  
will take. meanwhile, i want to prevent service outage. so i want to copy  
all of the data and binaries to another volume and start serving data from  
there.

what are my options?  
assuming that ill stop indexing while i am copying data, is that good  
enough?

i just did a dd of my drive to another volume while ES was running (but no  
indexing happening). but when i fired up the ES in the destination volume,  
it didnt work as i got bunch of "NoShardAvailableActionException exceptions.

thanks

---

<div class="post-metadata">

**Author:** ![Radu\_Gheorghe1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe1/32/2688_2.png) [@Radu\_Gheorghe1](https://discuss.elastic.co/u/Radu_Gheorghe1)\
**Post date:** [July 11, 2012, 7:26am UTC](https://discuss.elastic.co/t/how-to-copy-all-es-indexes-from-one-location-to-another/8380/2 "2012-07-11T07:26:45Z")

</div>

Hi,

I haven't tried it, but as far as I understand from here:  
[http://elasticsearch-users.115913.n3.nabble.com/ES-Backup-and-Restore-td3740144.html](http://elasticsearch-users.115913.n3.nabble.com/ES-Backup-and-Restore-td3740144.html)

you only need to disable flush and copy the data folder. Then you need to  
change the config so that it gets the data from the new location. That  
depends on how you have your ES installed. For example, if you installed it  
on Ubuntu/Debian from the .deb package, you need to change "DATA\_DIR" from  
/etc/default/elasticsearch

On Wednesday, July 11, 2012 12:57:49 AM UTC+3, T Vinod Gupta wrote:

> hi,  
> whats the best way to copy all the ES indexes in my node to another  
> mounted drive, lets say?
> 
> my filesystem on which ES installation, data and log files are present got  
> corrupted. i want to unmount and run fsck on it and i dont know how long it  
> will take. meanwhile, i want to prevent service outage. so i want to copy  
> all of the data and binaries to another volume and start serving data from  
> there.
> 
> what are my options?  
> assuming that ill stop indexing while i am copying data, is that good  
> enough?
> 
> i just did a dd of my drive to another volume while ES was running (but no  
> indexing happening). but when i fired up the ES in the destination volume,  
> it didnt work as i got bunch of "NoShardAvailableActionException exceptions.
> 
> thanks

---

<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 6, 2017, 3:20am UTC](https://discuss.elastic.co/t/how-to-copy-all-es-indexes-from-one-location-to-another/8380/3 "2017-07-06T03:20:37Z")

</div>


