# How can I change my default data from /var/lib/elasticsearch/ to /opt/elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-can-i-change-my-default-data-from-var-lib-elasticsearch-to-opt-elasticsearch/15252>\
**Category:** Elasticsearch\
**Created:** [January 15, 2014, 6:51pm UTC](https://discuss.elastic.co/t/how-can-i-change-my-default-data-from-var-lib-elasticsearch-to-opt-elasticsearch/15252 "2014-01-15T18:51:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![asrozar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asrozar/32/675_2.png) [@asrozar](https://discuss.elastic.co/u/asrozar)\
**Post date:** [January 15, 2014, 6:51pm UTC](https://discuss.elastic.co/t/how-can-i-change-my-default-data-from-var-lib-elasticsearch-to-opt-elasticsearch/15252/1 "2014-01-15T18:51:16Z")

</div>

I just upgraded from 90.3 (using tar.gz file) to 90.10 using the rpm.

My 90.3 was stored in /opt/elasticsearch, and the /opt is my largest  
partition, so I need to change this back if I can. Also, now Kibana is not  
looking at the indexes from /opt/elasticsearch, but I assuke once I move  
elasticsearch back it will be fine.

Thanks for your help!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8205a467-ac46-44e2-8b37-425ef25031e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8205a467-ac46-44e2-8b37-425ef25031e0%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![asrozar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asrozar/32/675_2.png) [@asrozar](https://discuss.elastic.co/u/asrozar)\
**Post date:** [January 15, 2014, 7:18pm UTC](https://discuss.elastic.co/t/how-can-i-change-my-default-data-from-var-lib-elasticsearch-to-opt-elasticsearch/15252/2 "2014-01-15T19:18:01Z")

</div>

It looks like its set int the start up script  
(-Des.default.path.data=$DATA\_DIR) but I cant find where $DATA\_DIR is set.  
Anyone know where $DATA\_DIR is set?

On Wednesday, January 15, 2014 1:51:16 PM UTC-5, [avery...@insecure-it.com](mailto:avery...@insecure-it.com)  
wrote:

> I just upgraded from 90.3 (using tar.gz file) to 90.10 using the rpm.
> 
> My 90.3 was stored in /opt/elasticsearch, and the /opt is my largest  
> partition, so I need to change this back if I can. Also, now Kibana is not  
> looking at the indexes from /opt/elasticsearch, but I assuke once I move  
> elasticsearch back it will be fine.
> 
> Thanks for your help!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8bdf375a-b731-4a35-8312-301074d63027%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bdf375a-b731-4a35-8312-301074d63027%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [January 15, 2014, 8:51pm UTC](https://discuss.elastic.co/t/how-can-i-change-my-default-data-from-var-lib-elasticsearch-to-opt-elasticsearch/15252/3 "2014-01-15T20:51:14Z")

</div>

The data directory pathname is stored within the elasticsearch.yml  
configuration file.

The path name to the configuration file may be specified passing the  
following option to the startup script, where _path-to-config_ is the name  
of the directory into which you store your customized elasticsearch.yml  
configuration file:

-Des.path.conf=_/path-to-config_

Brian

On Wednesday, January 15, 2014 2:18:01 PM UTC-5, [avery...@insecure-it.com](mailto:avery...@insecure-it.com)  
wrote:

> It looks like its set int the start up script  
> (-Des.default.path.data=$DATA\_DIR) but I cant find where $DATA\_DIR is set.  
> Anyone know where $DATA\_DIR is set?
> 
> On Wednesday, January 15, 2014 1:51:16 PM UTC-5, avery...@insecure-it.comwrote:
> 
> > I just upgraded from 90.3 (using tar.gz file) to 90.10 using the rpm.
> > 
> > My 90.3 was stored in /opt/elasticsearch, and the /opt is my largest  
> > partition, so I need to change this back if I can. Also, now Kibana is not  
> > looking at the indexes from /opt/elasticsearch, but I assuke once I move  
> > elasticsearch back it will be fine.
> > 
> > Thanks for your help!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/bcfbd112-a1b4-41db-984a-eabade3ee1a5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bcfbd112-a1b4-41db-984a-eabade3ee1a5%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:56am UTC](https://discuss.elastic.co/t/how-can-i-change-my-default-data-from-var-lib-elasticsearch-to-opt-elasticsearch/15252/4 "2017-07-06T01:56:38Z")

</div>


