# Change where logs are stored

**URL:** https://discuss.elastic.co/t/change-where-logs-are-stored/21592
**Category:** Elasticsearch
**Created:** [January 12, 2015, 8:15pm UTC](https://discuss.elastic.co/t/change-where-logs-are-stored/21592 "2015-01-12T20:15:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Taylor\_Wood](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@Taylor\_Wood](https://discuss.elastic.co/u/Taylor_Wood)
#### Post date: [January 12, 2015, 8:15pm UTC](https://discuss.elastic.co/t/change-where-logs-are-stored/21592/1 "2015-01-12T20:15:28Z")

</div>

I ran into an issue where logs are logging to the / and not the /data  
partition we setup for storing logs.  
df -h  
Filesystem Size Used Avail Use% Mounted on  
/dev/vda1 24G 19G 4.1G 83% /  
tmpfs 3.9G 0 3.9G 0% /dev/shm  
/dev/vdb1 99G 60M 94G 1% /data

This is probably an easy question for some, so hopefully I can get a reply  
quickly. How do I save the incoming logs from logstash and store them on  
the /data partition? I have tried making a change in the elasticsearch.yml  
to make the path.logs point to the /data partition however elasticsearch  
did not work correctly after.

[root@syslog1 elasticsearch]# cat /etc/elasticsearch/elasticsearch.yml  
path.data: /etc/elasticsearch  
path.work: /etc/elasticsearch  
path.logs: /var/log/elasticsearch/logs

# path.logs: /data/elasticsearch/logs

path.conf: /etc/elasticsearch

Any advice is appreciated.

--  
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/a76c5f31-0a72-46db-841f-8714ee53be33%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a76c5f31-0a72-46db-841f-8714ee53be33%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![oreno](https://avatars.discourse-cdn.com/v4/letter/o/b4bc9f/32.png) [@oreno](https://discuss.elastic.co/u/oreno)
#### Post date: [January 13, 2015, 5:22pm UTC](https://discuss.elastic.co/t/change-where-logs-are-stored/21592/2 "2015-01-13T17:22:45Z")

</div>

The path.logs set the location in which the elasticsearch application logs will be stored at.  
For setting where the logstash events will go to (index data), you need to set the path.data  
i.e:  
path.data: /data

Hope that helps.  
Oren

---

<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, 12:39am UTC](https://discuss.elastic.co/t/change-where-logs-are-stored/21592/3 "2017-07-06T00:39:17Z")

</div>


