title: “Move a shard to another node”
date: 2018-11-12T09:29:35
slug: move-a-shard-to-another-node
curl -X POST "localhost:9200/\_cluster/reroute" -H 'Content-Type: application/json' -d'
{
"commands" : [
{
"move" : {
"index" : "filebeat-2018.11.03", "shard" : 0,
"from\_node" : "elasticsearch01.mgm.muc01.fti.int", "to\_node" : "elasticsearch02.mgm.muc01.fti.int"
}
},
{
"allocate\_replica" : {
"index" : "filebeat-2018.11.03", "shard" : 1,
"node" : "elasticsearch03.mgm.muc01.fti.int"
}
}
]
}
'
