I installed ElasticSearch using defaults. Now my /var directory is full. I'd like to move ES to a different partition on the server without losing data. Can this be done and if so, how?
More specifically, I'd like to move data and logs to /spare >
Thanks Mark, but I was looking for more detailed steps. Here's what I ended up doing in case anyone else is looking for this information the future. >
• Determine current location of data files > curl "localhost:9200/_nodes/settings?pretty=true"
• Create new directory structure - e.g; > cd /spare > mkdir data
• Stop ntopng service > systemctl stop ntopng.service
• Stop ES service > systemctl stop elasticsearch.service
• Navigate to the current Data Directory determined in step 1 and copy files to new location > cp -RP * /spare/data/
• Change ownership on new directory to elasticsearch > chown -R elasticsearch:elasticsearch /spare/data
• Edit data path > vi /etc/elasticsearch/elasticsearch.yml
*Edit data parameter “path.data:” to “path.data:/spare/data
• Start ES > systemctl start elasticsearch.service
• Start ntopng > ntopng -F "es;flows;ntopng-%Y.%m.%d;http://127.0.0.1:9200/_bulk;" -e -i 1
*careful on this command as your input interface may not be -e -i 1 and your IP may be different.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.