简体   繁体   English

在 Elasticsearch 中是否有偏好对单个索引进行快照或对整个集群进行快照?

[英]Are there any preferences to take snapshots of individual indices or to take snapshots of the whole cluster in Elasticsearch?

I am trying to understand if in Elasticsearch, there are any advantages to take snapshots of individual indices in comparison to taking snapshots of the whole cluster in terms of performance, hardware usage (CPU/RAM/Disk/Network) and comfortable restoring process of the snapshot in the future.我试图了解在 Elasticsearch 中,在性能、硬件使用率(CPU/RAM/磁盘/网络)和舒适的恢复过程方面,与对整个集群进行快照相比,对单个索引进行快照是否有任何优势。未来的快照。 Can anyone describe it to me?谁能给我描述一下?

Maybe this answer does not evaluate the two cases from all points of view.也许这个答案并没有从所有角度评估这两种情况。 But I want to share one point: since it is mentioned in the Elasticsearch documentation that snapshots are taken from segments and snapshots are incrementally taken (only new segments are taken in new snapshots) [1], so it senses that taking a snapshot from n indices should not generally differ from taking n snapshots from each index (I'm not sure about exceptions such as metadata and feature states).但是我想分享一点:由于segments文档中提到,快照是从segment中拍摄的,并且快照是增量拍摄的(仅在新快照中拍摄新的segment)[1],所以它感觉到从n中拍摄快照索引通常不应不同于从每个索引中获取n快照(我不确定元数据和功能状态等例外情况)。

But there might be a limitation in taking a lot of snapshots from individual indices: if number of snapshots increases, memory of the master node and the cluster performance might be affected.但是从单个索引中获取大量快照可能会有限制:如果快照数量增加,主节点的 memory 和集群性能可能会受到影响。 It is mentioned in the Elasticsearch documentation where setting a retention for snapshots in configuring SLM is suggested [2]. Elasticsearch 文档中提到,建议在配置 SLM 时为快照设置保留 [2]。

[1] https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html [1] https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html

[2] https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-take-snapshot.html [2] https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-take-snapshot.html

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

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