Hey,
I tried to use oss (Alibaba Cloud Storage) to add some errors when adding elasticsarch(6.7.1) backup. Here are my steps.
1、Mount oss to all elasticsearch servers and change directory permissions to elasticsearch
# ossfs adbright-log-tmp /backup -ourl=http://oss-cn-beijing-internal.aliyuncs.com -ouid=498 -ogid=498 -o allow_other
2、Add path.repo: ["/backup"] to elasticsearh.yml and then scroll restart the elasticsarch cluster
3、Create a snapshot repo
PUT _snapshot/my_backup
{
"type": "fs",
"settings": {
"location": "/backup",
"compress": true
}
}
4、Backup index
PUT _snapshot/my_backup/snapshot_nginx-access-bid.xigua-2019.06.10
{
"indices": "nginx-access-bid.xigua-2019.06.10"
}
In the third step, when creating snapshot repo, I have the following error.
{
"error": {
"root_cause": [
{
"type": "repository_verification_exception",
"reason": "[my_backup] path is not accessible on master node"
}
],
"type": "repository_verification_exception",
"reason": "[my_backup] path is not accessible on master node",
"caused_by": {
"type": "file_system_exception",
"reason": "/backup/tests-sy0__tCeTmW5w_3-uVkp-g/pending-master.dat-_m_AzPLkRs-q5bkYbohscA -> /backup/tests-sy0__tCeTmW5w_3-uVkp-g/master.dat: Operation not permitted"
}
},
"status": 500
}
Then I use "GET _snapshot/my_backup" to view the snapshot repo information.
{
"my_backup" : {
"type" : "fs",
"settings" : {
"compress" : "true",
"location" : "/backup"
}
}
}
After that, I backed up the index and then viewed the snapshot information, which prompted the snapshot to be lost, but the /backup directory stores the snapshot information of the index.
{
"error" : {
"root_cause" : [
{
"type" : "snapshot_missing_exception",
"reason" : "[my_backup:snapshot_nginx-access-bid.xigua-2019.06.10] is missing"
}
],
"type" : "snapshot_missing_exception",
"reason" : "[my_backup:snapshot_nginx-access-bid.xigua-2019.06.10] is missing"
},
"status" : 404
}
I have found a lot of information about permission issues, but my permissions are already running permissions for elasticsarch. Is there any advice?
Thanks.