一、备份策略
ES属于nosql中间件,与redis一样默认不支持备份服务。
备份策略信息:
每天一次全备,备份文件保存14天,备份文件存在S3
二、实现工具
两种实现方式:
- 使用elasticdump
# 备份 openresty-monitor-2022.06.01
# 导出mapping
elasticdump \
--input=http://172.25.81.227:9200/openresty-monitor-2022.06.01 \
--output=/data/openresty-monitor-2022.06.01_mapping.json \
--type=mapping
# 导出数据
elasticdump \
--input=http://172.25.81.227:9200/openresty-monitor-2022.06.01 \
--output=/data/openresty-monitor-2022.06.01.json \
--type=data
- logstash
三、案例
- CPS ES 每天全备一次,备份保留14天,备份job:http://172.21.141.48:8080/view/elasticsearch_mongo/job/cps.es.backup.Timedtask/