本文介绍了如何移动弹性搜索数据目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个默认安装的弹性搜索。它似乎存储在



/ var / lib / elasticsearch / elasticsearch / nodes



问题:



如果我想将数据移动到同一台机器上的另一个位置(比如说/ foo / bar)



1)我复制的/ var / lib / elasticsearch树中的什么级别,和



B)path.data的相关设置是什么在elasticisearch.yml

解决方案

A。您需要移动 elasticsearch 文件夹,即,该文件夹与您的 cluster.name 具有相同的名称 elasticsearch.yml 文件。



B。您需要将 elasticsearch.yml 文件中的 path.data 设置修改到您移动的新文件夹数据到。



所以,说你目前正在使用 / var / lib / elasticsearch ,你想移动数据文件夹到 / foo / bar ,这里是你需要做的:

 > mv / var / lib / elasticsearch / foo / bar 

然后在弹性搜索。 yml 修改 path.data 至:

  path.data:/ foo / bar 

最后你的数据将被存储在 / foo / bar / elasticsearch 而不是 / var / lib / elasticsearch 。确保弹性搜索过程可以访问您的新文件夹。


I have a default installation of Elasticsearch. It seems to be storing it's data in

/var/lib/elasticsearch/elasticsearch/nodes

So two questions:

if I want to move my data to another location on the same machine (let's say /foo/bar for example)

1) what level in the /var/lib/elasticsearch tree do I copy, and

B) what is the relevant setting for path.data in elastisearch.yml

解决方案

A. You need to move the elasticsearch folder, i.e. that's the folder which bears the same name as your cluster.name configured in the elasticsearch.yml file.

B. You need to modify the path.data setting in the elasticsearch.yml file to the new folder you've moved the data to.

So, say you are currently using /var/lib/elasticsearch and you want to move the data folder to /foo/bar, here is what you need to do:

> mv /var/lib/elasticsearch /foo/bar

Then in elasticsearch.yml modify path.data to:

path.data: /foo/bar

You'll end up with your data being stored in /foo/bar/elasticsearch instead of /var/lib/elasticsearch. Make sure that the elasticsearch process can access your new folder.

这篇关于如何移动弹性搜索数据目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 21:39