从快照还原
Elasticsearch快照命令
POST /_snapshot/backup_repo/snap1/_restore
{
"indices": "customer",
"rename_pattern": "customer",
"rename_replacement": "customer_restored"
}作用
将快照中的索引还原到集群(可选择重命名)。
适用场景
用于数据丢失后的恢复,或将备份迁移到测试环境。
注意
要以相同名称还原,目标索引必须已关闭或删除;不能覆盖打开状态的索引进行还原。