I have 4 different elastic nodes in a cluster.
Want to take a snapshot from one of the server which is having primary shard.
Step 1: sudo systemctl stop elasticsearch
Step 2: add path.repo: ["/data/elasticbackup"]
in elasticsearch.yaml file.
Step 3: Give permission to the folder path sudo chmod 777 -R /data/elasticbackup
Step 4: sudo systemctl start elasticsearch
Will it join in the cluster automatically after starting the node ? What is the immediate activity we have to perform if node join fails?
Step 5: PUT request from postman to register snapshot
http://xx.xx.xx.xx:4200/_snapshot/elasticbackup
{
"type":"fs",
"settings": {
"compress" : true,
"location" : "/data/elasticbackup"
}
}
Step 6: Validate weather snapshot has been registered or not.
GET request from postman:
http://xx.xx.xx:4200/_snapshot/_all
output:
{
"elasticbackup": {
"type": "fs",
"settings": {
"compress": "true",
"location": "/data/elasticbackup"
}
}
}
Step 7: Take snapshop ( around 300 GB productioncustomerdata indices )
http://xx.xx.xx.xx:4200/_snapshot/elasticbackup/snapshot_1?wait_for_completion=true
input :
{
"indices": "productioncustomerdata"
}
Step 8: Delete existing primary indices - productioncustomerdata
DELETE request - indices - http://xx.xx.xx.xx:4200/productioncustomerdata
Are the above steps are correct? Or do we need to perform any other activity ?