停止 Elasticsearch 快照

停止 Elasticsearch 快照

我们每晚都会对 S3 进行快照。通常需要大约 2 小时。我有一个已经运行了 4 天的快照。我尝试使用以下命令停止它:

time curl -XDELETE -s localhost:9200/_snapshot/sim-s3-backup/sim-autobackup_2015-05-15/?pretty

但是,即使该命令也挂起了。所以我让它运行了一段时间,以下是完整输出:

time curl -XDELETE -s localhost:9200/_snapshot/sim-s3-backup/sim-autobackup_2015-05-15/?pretty
^C

real    1544m19.284s
user    0m0.508s
sys     0m2.580s

还有其他方法可以停止此快照吗?作为参考,这是状态的输出:

curl -XGET -s localhost:9200/_snapshot/sim-s3-backup/sim-autobackup_2015-05-15/?pretty                        
{
  "snapshots" : [ {
    "snapshot" : "sim-autobackup_2015-05-15",
    "indices" : [ "7199", "7399", "7299", "7499", "7599", "6202085", "6202082", "6202083", "8099", "6202059", "6202055", "5099", "5299", "5199", "6202076", "6202075", "6202078", "6202077", "6202079", "5899", "6202071", "6202073", "5699", "40061", "40064", "40065", "5599", "6201572", "3001", "3002", "3008", "3007", "3006", "3005", "5999", "6202044", "6202018", "6202013", "10109", "10009", "6099", "70005", "6201266", "6199", "6299", "10309", "10409", "10609", "10509", "7099", "6799", "6899", "40054", "40057", "40055", "40056", "6202068", "6202067", "6202060", "6699" ],
    "state" : "IN_PROGRESS",
    "start_time" : "2015-05-16T09:30:06.303Z",
    "start_time_in_millis" : 1431768606303,
    "failures" : [ ],
    "shards" : {
      "total" : 0,
      "failed" : 0,
      "successful" : 0
    }
  } ]
}

我只是想以某种方式停止它(而不停止整个集群)。然后我可以删除它或重新运行新的快照并获取今天的日期。

答案1

我修复了它,尽管不是理想的方法。只需一次重新启动一个节点(简单的双节点集群)就会导致快照失败。好消息是由于集群特性,使用 ES 的服务没有停机。

相关内容