标签:settings pos nbsp location short int search 状态 查看
声明es
import elasticsearch6
es = elasticsearch6("10.10.10.10:9200")
#查看当前所有仓库
es.snapshot.get_repository()
#删除已存在的仓库(假设已存在的仓库叫"beifen")
es.snapshot.delete_repository("beifen")
#创建一个新的仓库
print new_es.snapshot.create_repository("20200515",{"type": "fs","settings": {"location": "/elasticsearch/snapshort-back/20200512"}})
#创建一个快照
es.snapshot.create("20200515","index_1_shot",{"indices":"index_1"
...: ,"ignore_unavailable": True,"include_global_state": False})
#获取仓库中某快照的状态
es.snapshot.get("20200515","snapname“”)
#删除一个快照
标签:settings pos nbsp location short int search 状态 查看
原文地址:https://www.cnblogs.com/supermanwx/p/12896507.html