ES升級

MT_IT發表於2024-04-29

1、目標es配置白名單那(重啟生效)

reindex.remote.whitelist: "IP:9800"
http.cors.enabled: true
http.cors.allow-origin: "*"

2、遷移
reindex: 請求的是目標es,reindex語法用目標es的

[root@node1 config]# curl -X POST -H "Content-Type: application/json" IP:9801/_reindex  -d '
{
  "source": {
    "remote": {
      "host": "http://IP:9800", 
      "username": "elastic",
      "password": "passwd",
      "socket_timeout": "30m",
      "connect_timeout": "3m"
	},
    "index": "inde1",
    "size": 5000
  },
  "dest": {
    "index": "inde1",
	"op_type": "create"
   }
}'

相關文章