简体   繁体   English

Elasticsearch将索引从一台服务器复制到另一台服务器?

[英]Elasticsearch copy the index from one server to another server?

How to copy ES (v 5.x) index from one server to another server. 如何将ES(v 5.x)索引从一台服务器复制到另一台服务器。 i don't have privileges to install any software in that machine. 我没有特权在该计算机上安装任何软件。 have any better solution to copy the index ? 有更好的解决方案来复制索引吗? will backup and restore work? 将备份和还原工作? please share your suggestion 请分享您的建议

You can reindex from remote server 您可以从远程服务器重新索引

POST _reindex
{
  "source": {
    "remote": {
      "host": "http://otherhost:9200",
      "username": "user",
      "password": "pass"
    },
    "index": "source",
    "query": {
      "match": {
        "test": "data"
      }
    }
  },
  "dest": {
    "index": "dest"
  }
}

You can also use snapshots but it will require you to change config files and have storage accessible by both servers 您也可以使用快照,但是这将需要您更改配置文件,并且两台服务器都可以访问存储

Reindex will copy your documents from the source index to the destination index. 重新索引会将您的文档从源索引复制到目标索引。 But before you do that your destination index needs to be created and configured first. 但是在执行此操作之前,需要先创建和配置目标索引。 Reindexing won't copy your settings and mappings from the old index to the new index. 重新索引不会将您的设置和映射从旧索引复制到新索引。 To get everything, you need to create a snapshot of the source index and then restore it in the destination index. 要获取所有内容,您需要创建源索引的快照,然后将其还原到目标索引中。 Here is the elasticsearch documentation for snapshot and restore. 这是用于快照和还原的elasticsearch文档 This link is also pretty helpful. 链接也很有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将弹性搜索索引或日志从一个弹性搜索服务器复制到另一个? - How to copy elasticsearch indices or logs from one elasticsearch server to another? 在Elasticsearch中将索引从一台机器复制到另一台机器 - To copy an index from one machine to another in elasticsearch 如何将机器学习模型从一台Elasticsearch服务器复制到另一台服务器? - How can I copy a machine learning model from one Elasticsearch server to another? 如何将 elasticsearch 数据从一台服务器移动到另一台服务器 - how to move elasticsearch data from one server to another Elasticsearch:将实体从一个索引复制到另一个索引 - Elasticsearch: copying entities from one index to another ElasticSearch将索引分配给服务器 - ElasticSearch Assign Index to Server 用elasticsearch替换索引服务器 - replacing index server with elasticsearch 如何将索引从旧服务器迁移到 elasticsearch 的新服务器 - How to migrate index from Old Server to new server of elasticsearch 一个索引中的Elasticsearch字段出现在另一索引中 - Elasticsearch fields from one index appearing into another index 是否可以在弹性搜索查询中从另一个索引中过滤一个索引的记录? - Is it possible to filter records of one index from another index in elasticsearch query?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM