/usr/share/elasticsearch/bin/elasticsearch-plugin install repository-s3
jvm.options(集群所有服务器都要操作)
添加内容
-Des.allow_insecure_settings=true
curl -H "Content-Type: application/json" -X PUT http://192.168.1.100:9200/_snapshot/my_backup -d ‘{"type": "s3","settings": {"endpoint": "obs.cn-north-1.myhuaweicloud.com","access_key": "xxxxxxxxxxxxxxx","secret_key": "xxxxxxxxxxxxxxxxx","bucket": "OBS桶名","compress":"true"}}‘
curl -XPUT ‘http://192.168.1.100:9200/_snapshot/backup/index_bak‘ -d ‘{"indices": "index1,index2"}‘
curl -H "Content-Type: application/json" -X PUT ‘http://elastic:***@es-cn-***.elasticsearch.aliyuncs.com:9200/_snapshot/my_backup/‘ -d‘ {"type": "oss","settings": {"endpoint": "http://oss-cn-beijing-internal.aliyuncs.com","access_key_id": "***","secret_access_key": "***","bucket": "OSSBucket 名称","compress":"true"}}‘
curl -H "Content-Type: application/json" -X PUT http://elastic:***@es-cn-***.elasticsearch.aliyuncs.com:9200/_snapshot/my_backup/index_bak/_restore
华为云自建elasticsearch集群迁到移阿里云的elasticsearch
原文:https://www.cnblogs.com/zhangb8042/p/12803704.html