使用了
kibana
进行请求发送
1.旧es创建快照
1.查看elasticsearch.yml配置的仓库路径,没有添加上,重启es
path.repo: ["E:/develop/elasticsearch-7.9.3/backups"]
2.注册仓库,如仓库名
backup1
PUT /_snapshot/backup1
{
"type": "fs",
"settings": {
"location": "backup1"
}
}
# 查看仓库地址
GET /_snapshot/backup1?pretty
3.创建两个快照,如
snapshot_1
,snapshot_2
PUT /_snapshot/backup1/snapshot_1?wait_for_completion=true
PUT /_snapshot/backup1/snapshot_2?wait_for_completion=true
# 查看仓库所有快照
GET /_snapshot/backup1/_all?pretty
2.新es恢复快照
1.复制旧
backups
目录下所有仓库到新es的backups
(新es的仓库路径)路径下
2.注册仓库
PUT /_snapshot/backup1
{
"type": "fs",
"settings": {
"location": "backup1"
}
}
3.查看仓库所有快照
GET /_snapshot/backup1/_all?pretty
4.从快照
snapshot_1
恢复
POST /_snapshot/backup1/snapshot_1/_restore?wait_for_completion=true
5.查看恢复进度文章来源:https://www.toymoban.com/news/detail-722432.html
GET /_recovery
6.查看恢复的索引数据文章来源地址https://www.toymoban.com/news/detail-722432.html
GET /_cat/indices?v
到了这里,关于Elasticsearch创建快照与快照恢复的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!