/
ElasticSearch

ElasticSearch

Backup:

#Install plugin:- sudo ES_PATH_CONF=/etc/elasticsearch/<folder name start with es or cs>/usr/share/elasticsearch/bin/elasticsearch-plugin install repository-azure

#change the configuration: sudo vi /etc/elasticsearch/<folder name start with es or cs>/elasticsearch.yml cloud.azure.storage.default.account: xxxxxxxxxxx cloud.azure.storage.default.key: xxxxxx

#Restart ES Service: sudo systemctl restart es-node-2_elasticsearch.service

#create Repo: curl -XPUT 'http://localhost:9200/_snapshot/azurebackup' -H 'Content-Type: application/json' -d '{ "type": "azure", "settings": { "container": "<blob_name>", "base_path": "<storage_account_name>"} }'

#create Snapshot: curl -XPUT 'http://localhost:9200/_snapshot/azurebackup/snapshot_1' -H 'Content-Type: application/json' -d '{ "indices":"*","include_global_state":false }'

#check status of backup curl -XGET 'http://localhost:9200/_snapshot/azurebackup/_all'


Restore: #Install plugin:- sudo ES_PATH_CONF=/etc/elasticsearch/es-node-2 /usr/share/elasticsearch/bin/elasticsearch-plugin install repository-azure

#change the configuration: sudo nano /etc/elasticsearch/es-node-2/elasticsearch.yml cloud.azure.storage.default.account: xxxxxxxxxxx cloud.azure.storage.default.key: xxxxxx

#Restart ES Service: sudo systemctl restart es-node-2_elasticsearch.service

#create Repo: curl -XPUT 'http://localhost:9200/_snapshot/azurebackup' -H 'Content-Type: application/json' -d '{ "type": "azure", "settings": { "container": "<blob_name>", "base_path": "<storage_account_name>"} }'


#Delete unwanted indices curl -XDELETE 'http://localhost:9200/_all'

#Restore from snapshot curl -XPOST 'http://localhost:9200/_snapshot/azurebackup/snapshot_1/_restore'

#To check the status of snapshot restore curl -s "http://localhost:9200/_snapshot/azurebackup/snapshot_1/_status?pretty"

Related content

ArgoCD setup:
ArgoCD setup:
Read with this
Elasticsearch Backup & Restore In Azure and Local Environment
Elasticsearch Backup & Restore In Azure and Local Environment
More like this
Core Elasticsearch upgrade
Core Elasticsearch upgrade
More like this
Elasticsearch upgrade in Sunbird Platform
Elasticsearch upgrade in Sunbird Platform
More like this
Easy Installer Database Restores
Easy Installer Database Restores
More like this
Elasticsearch Version Upgrade: 6.8.22 to 7.17.13
Elasticsearch Version Upgrade: 6.8.22 to 7.17.13
More like this