Options: --config PATH Path to configuration file. Default: ~/.curator/curator.yml --dry-run Do not perform any changes. --version Show the version and exit. --help Show this message and exit ### 实例 ## 编写curator.yml(服务器的配置文件) ## 编写action.yml(执行的命令) /bin/curator --config curator.yml action.yml
actions: 1: action:delete_indices description:>- Delete indices older than 45 days (based on index name), for logstash- prefixed indices. Ignore the error if the filter does not result in an actionable list of indices (ignore_empty_list) and exit cleanly. options: ignore_empty_list:True timeout_override: continue_if_exception:False disable_action:False filters: -filtertype:pattern kind:prefix value:chuye-adcounter- exclude:True##默认为False,如果为True,表示排除。 -filtertype:age source:name direction:older timestring:'%Y.%m.%d' unit:days unit_count:5 exclude:
actions: 1: action:snapshot description:>- Snapshot logstash- prefixed indices older than 1 day (based on index creation_date) with the default snapshot name pattern of 'curator-%Y%m%d%H%M%S'. Wait for the snapshot to complete. Do not skip the repository filesystem access check. Use the other options to create the snapshot. options: repository:search-backup##备份到那个仓库 name:search-%Y%m%d%H%M%S## 备份服务器的时间 ignore_unavailable:False include_global_state:True partial:False wait_for_completion:True skip_repo_fs_check:False timeout_override: continue_if_exception:False disable_action:False filters: -filtertype:pattern## 匹配要备份的分片 kind:regex value:.* exclude: -filtertype:age## 设置要备份的时间范围 source:creation_date direction:older unit:days unit_count:1 exclude: