对于 1.5 以后的es升级是很容易的事情,备份快照然后升级。

1
2
3
4
5
6
7
8
9
10
11
12
# 创建
curl -XPUT 127.0.0.1:9200/_snapshot/backup -d '
{
"type":"fs",
"settings":{"location":"/data/backup/es"}
}'

# 备份
curl -XPUT 127.0.0.1:9200/_snapshot/backup/es-snapshot?wait_for_completion=true

# 恢复
curl -XPOST 127.0.0.1:9200/_snapshot/backup/es-snapshot/_restore