rename_pattern编辑

此设置仅由 恢复 操作使用。

来自 Elasticsearch 文档

rename_patternrename_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 阅读有关此设置的更多信息

没有默认值。