简体   繁体   English

弹性搜索部分快照的工作原理

[英]How elastic-search partial snapshots work

If I keep on taking snapshots , and lets assume the first two snapshots ended up in being partial snapshots and third one succeeds , then can I delete those partial snapshots and be able to restore everything from the third snapshot?如果我继续拍摄快照,并假设前两个快照最终成为部分快照而第三个成功,那么我可以删除那些部分快照并能够从第三个快照恢复所有内容吗? Or do i need to keep all the snapshots ?还是我需要保留所有快照?

Will I be able to just refer to the third snapshots for restoring indices [elastic will look it up for me in partial snapshots if not present in the final one?我能否仅参考第三个快照来恢复索引[如果最后一个快照中没有,elastic 会在部分快照中为我查找它吗? ] or do I need to go explicitly to those partial snapshots for some of the indices to be restored? ] 或者我是否需要明确访问那些要恢复的某些索引的部分快照?

fullsnap-201902 PARTIAL 1547497447  20:24:07   1547498721 20:45:21    21.2m     163               417             6          423
fullsnap-201903 PARTIAL 1547498746  20:45:46   1547499531 20:58:51      13m     163               420             3          423
fullsnap-201904 SUCCESS 1547500210  21:10:10   1547500864 21:21:04    10.8m     163               423             0          423

A PARTIAL snapshot indicates an error condition, more precisely that the data for some shard could not be backed up. PARTIAL 快照表示错误情况,更准确地说,某些分片的数据无法备份。 So before attempting any restore you should first investigate why those partial snapshots happens in the first place by looking at the failure section of the snapshot response.因此,在尝试任何恢复之前,您应该首先通过查看快照响应的failure部分来调查为什么会首先发生这些部分快照。

If you attempt to restore a PARTIAL snapshot (using partial: true ), then shards that could not be snapshotted in the first place will be recreated empty, which is probably not what you're looking for.如果您尝试恢复 PARTIAL 快照(使用partial: true ),那么最初无法创建快照的分片将被重新创建为空的,这可能不是您想要的。

To sum up:总结:

  1. I would first investigate why your snapshot was PARTIAL我会先调查为什么你的快照是 PARTIAL
  2. I would only try to restore snapshots that ended up in SUCCESS我只会尝试恢复以 SUCCESS 结束的快照

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM