ElasticSearch backups repository configuration - kwantu/platformconfiguration GitHub Wiki

back

Configuring backup repositories and Restoring them.

  1. First create the directory on the file system
cd /usr/local/data/
mkdir elastic_backup
chown elasticsearch:elasticsearch elastic_backup
  1. Then register that in the yaml file
cd /etc/elasticsearch/
vim elasticsearch.yml

# Insert the following at the bottom of the file
path.repo: ["/usr/local/data/elastic_backup"]

Save and restart elasticsearch to pick up the changed file

  1. Register the repository in kibana
Stack Management
Snapshot and Restore
Repositories
Add repository
Give the unique repository name (eg. "Daily backups")
Select a shared file system option

Notes from problems experienced with restoring snapshots

  1. If you restore the repository and you select the full repository context, then you have to make sure that at the very least the kibana and elastic users passwords are the same on the current and the source repository. Else Kibana and Elastic users authentication will suddenly start failing.
  2. To reset the passwords use the passwords tool
cd /usr/share/elasticsearch/bin
./elasticsearch-setup-passwords interactive
  1. You cannot easily downgrade to 7.10 from 7.12. We will need to consider a new approach to use OpenSearch