专注于 JetBrains IDEA 全家桶,永久激活,教程
持续更新 PyCharm,IDEA,WebStorm,PhpStorm,DataGrip,RubyMine,CLion,AppCode 永久激活教程

Elasticsearch恢复备份的数据

 1、恢复备份好的snapshot

 1.1恢复snapshot_1下的所有index

 POST _snapshot/my_backup/snapshot_1/_restore

 1.2恢复snapshot_1下指定的index

 POST /_snapshot/my_backup/snapshot_1/_restore
 {
     "indices": "index_1", 
     "rename_pattern": "index_(.+)", 
     "rename_replacement": "restored_index_$1" 
 }

 恢复index_1的数据,并将index_1重命名为restored_index_1

 2、查看恢复进度

 2.1、查看指定的index恢复进度
 GET restored_index_3/_recovery

 2.2、查看所有的index恢复进度
 GET /_recovery/
 {
   "restored_index_3" : {
     "shards" : [ {
       "id" : 0,
       "type" : "snapshot", 
       "stage" : "index",
       "primary" : true,
       "start_time" : "2014-02-24T12:15:59.716",
       "stop_time" : 0,
       "total_time_in_millis" : 175576,
       "source" : { 
         "repository" : "my_backup",
         "snapshot" : "snapshot_3",
         "index" : "restored_index_3"
       },
       "target" : {
         "id" : "ryqJ5lO5S4-lSFbGntkEkg",
         "hostname" : "my.fqdn",
         "ip" : "10.0.1.7",
         "name" : "my_es_node"
       },
       "index" : {
         "files" : {
           "total" : 73,
           "reused" : 0,
           "recovered" : 69,
           "percent" : "94.5%" 
         },
         "bytes" : {
           "total" : 79063092,
           "reused" : 0,
           "recovered" : 68891939,
           "percent" : "87.1%"
         },
         "total_time_in_millis" : 0
       },
       "translog" : {
         "recovered" : 0,
         "total_time_in_millis" : 0
       },
       "start" : {
         "check_index_time" : 0,
         "total_time_in_millis" : 0
       }
     } ]
   }
 }

 type 待恢复的snapshot
 source 待恢复的snapshot的详细信息
 percent 恢复进度

 3、取消恢复

 DELETE /restored_index_3

文章永久链接:https://tech.souyunku.com/23887

未经允许不得转载:搜云库技术团队 » Elasticsearch恢复备份的数据

JetBrains 全家桶,激活、破解、教程

提供 JetBrains 全家桶激活码、注册码、破解补丁下载及详细激活教程,支持 IntelliJ IDEA、PyCharm、WebStorm 等工具的永久激活。无论是破解教程,还是最新激活码,均可免费获得,帮助开发者解决常见激活问题,确保轻松破解并快速使用 JetBrains 软件。获取免费的破解补丁和激活码,快速解决激活难题,全面覆盖 2024/2025 版本!

联系我们联系我们