【发布时间】:2021-11-01 12:08:04
【问题描述】:
您好,我有 3 个节点 elasticsearch 集群(源),我有快照调用 从源集群获取的快照 1 我还有另一个 6 节点弹性搜索集群(目标)集群
当我使用此命令从快照 1 恢复我的目标集群时
curl -X POST -u elastic:321 "192.168.2.15:9200/snapshot/snapshot_repository/snapshot-1/_restore?pretty" -H 'Content-Type: application/json' -d'
> {
> "indices": "*",
> "ignore_unavailable": true,
> "include_global_state": false,
> "rename_pattern": ".security(.+)",
> "rename_replacement": "delete_$1",
> "include_aliases": false
> }
> '
{
我得到了这个错误
"error" : {
"root_cause" : [
{
"type" : "snapshot_restore_exception",
"reason" : "[snapshot:snapshot-1 yjg/mHsYhycHQsKiEhWVhBywxQ] cannot restore index [.ilm-history-0003] because an open index with same name already exists in the cluster. Either close or delete the existing index or restore the index under a different name by providing a rename pattern and replacement name"
}
如您所见,索引 .ilm-history-0003 已存在于集群中,但我如何仅使用 1 个 rename_pattern 对 security、.ilm、.slm、.transfrom 索引进行重命名替换? 喜欢这个
"rename_pattern": ".security(.+)",
【问题讨论】:
标签: elasticsearch