elasticsearch 7.6以支持
一、monio
1、部暑minio
mkdir -p /data/minio/{data,config}
cat > /data/minio/start.sh << 'EOF'
docker run -d \
-p 9000:9000 \
-p 9001:9001 \
--name minio \
--restart=always \
-e "MINIO_ROOT_USER=admin" \
-e "MINIO_ROOT_PASSWORD=admin123456" \
-e "MINIO_PROMETHEUS_AUTH_TYPE=public" \
-v /data/minio/data:/data/minio/data \
-v /data/minio/config:/root/.minio \
-v /etc/localtime:/etc/localtime \
minio/minio server /data/minio/data \
--console-address ":9001"
EOF
bash /data/minio/start.sh
2、创建用户和bucket
minio_username: elasticsearch
minio_password: XuGPEJWH2Hg9CixejOAkXpu0dke8i8ov
minio_bucket: es-bucket
二、elasticsearch 安装和插件安装
elasticsearch 安装(略)
1、每台ES节点上都需要安装,
#进入容器
docker exec -it elasticsearch bash
bin/elasticsearch-plugin install repository-s3
2、设置elasticsearch.keystore
bin/elasticsearch-keystore add s3.client.default.access_key #输入elasticsearch
bin/elasticsearch-keystore add s3.client.default.secret_key #输入XuGPEJWH2Hg9CixejOAkXpu0dke8i8ov
3、设置s3的endpoint
elasticsearch.yml最后添加
s3.client.default.endpoint: 192.168.11.100:9000
s3.client.default.protocol: http
4、重启elasticsearch
三、elasticsearch 设置repository
PUT _snapshot/minio_s3_repository
{
"type": "s3",
"settings": {
"bucket": "es-bucket"
}
}
四、创建备份策略
已生成快照