How can I safely move Elasticsearch indices to another mount in Linux?

I'm having a number of indices which are actually causing some space issues at the moment in my Ubuntu machine. The indices keep growing on a daily basis.

So I thought of moving it to another mount directory which has more space apparently. How can I do this safely?

And I have to make sure that the existing ES indices and the Kibana graphs would be safe enough after the doing the move.

What I did: Followed this SO and moved my data directory of Elasticsearch somehow to the directory (/data/es_data) I needed, but after I did that, I couldn't view my existing indices plus the Kibana graphs and dashboards which I created as well.

Am I doing something wrong? Any help could be appreciated.

Did you shut down ES?
Did you update

Thanks @warkolm for the response. :slight_smile:

Yes, I did shut down first and then only I moved the data.

yes I had it as: /data/es_data

And the data folder is actually within the es_data, so I reckon path should've been as follows, which I guess I've missed it out: /data/es_data/data

Or is there something I'm missing out?

What are the old and new paths?

1 Like

I've actually given the path wrong. Now it works!

Thank you @warkolm :slight_smile:

@warkolm A small clarification on the above change:

Should I also have to point Kibana to pick up ES data from the new location?

Or will it automatically pick it up?

Is there any change, I should make in the Kibana configuration?

No, nothing to change there.

1 Like

Thanks again :slight_smile:

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