rename_replacement
编辑rename_replacement编辑
此设置仅由 恢复 操作使用。
来自 Elasticsearch 文档
rename_pattern 和 rename_replacement 选项也可以用于在恢复时使用正则表达式重命名索引,该正则表达式支持引用原始文本,如 此处 所述。
actions: 1: action: restore description: >- Restore all indices in the most recent snapshot with state SUCCESS. Wait for the restore to complete before continuing. Do not skip the repository filesystem access check. Use the other options to define the index/shard settings for the restore. options: repository: # If name is blank, the most recent snapshot by age will be selected name: # If indices is blank, all indices in the snapshot will be restored indices: rename_pattern: 'index(.+)' rename_replacement: 'restored_index$1' wait_for_completion: True max_wait: 3600 wait_interval: 10 filters: - filtertype: state state: SUCCESS exclude: - filtertype: ...
在此配置中,Elasticsearch 将捕获 index
后出现的任何内容,并将其放在 restored_index
后。例如,如果我正在恢复 index-2017.03.01
,则结果索引将被重命名为 restored_index-2017.03.01
。
有关此设置的更多信息,请访问 https://elastic.ac.cn/guide/en/elasticsearch/reference/8.13/snapshots-restore-snapshot.html
没有默认值。