是否可以从 Elasticsearch 中的集群获取单个索引快照
Is it possible to take individual index snapshot from a cluster in Elasticsearch
我正在处理 Elasticsearch 快照和还原,我知道在还原时我们可以选择还原整个集群,或者只还原快照中所需的索引。但是我们是否有可用的功能使我们能够只从集群中获取所需索引的快照我看不到这方面的支持文档。因此在这里问,如果有选择,请告诉我。
问候。
是的,您可以拍摄特定索引的快照。来自documentation
By default a snapshot of all open and started indices in the cluster is created. This behavior can be changed by specifying the list of indices in the body of the snapshot request.
PUT /_snapshot/my_backup/snapshot_1
{
"indices": "index_1,index_2",
"ignore_unavailable": true,
"include_global_state": false
}
我正在处理 Elasticsearch 快照和还原,我知道在还原时我们可以选择还原整个集群,或者只还原快照中所需的索引。但是我们是否有可用的功能使我们能够只从集群中获取所需索引的快照我看不到这方面的支持文档。因此在这里问,如果有选择,请告诉我。
问候。
是的,您可以拍摄特定索引的快照。来自documentation
By default a snapshot of all open and started indices in the cluster is created. This behavior can be changed by specifying the list of indices in the body of the snapshot request.
PUT /_snapshot/my_backup/snapshot_1 { "indices": "index_1,index_2", "ignore_unavailable": true, "include_global_state": false }