我有需要从快照恢复的索引,方法是使用 rename_pattern 和 rename_replacement。有人可以帮我做图案和更换吗?
假设我的输入索引名称是:“abc_def_r22_0”,我希望它恢复为“abc_def_r44_0”
NUM="44"
POST /_snapshot/my_backup/snapshot_1/_restore
{
"indices": "abc_def_r22_0",
"ignore_unavailable": "true",
"include_global_state": false,
"rename_pattern": "\\d\\d",
"rename_replacement": "$1'$NUM'_0"
}