Closed Robsteranium closed 2 years ago
For the time being I've just created a filesystem repository for snapshots...
I added a dir /etc/elasticsearch/elasticsearch.yml
:
path.repo: /var/lib/elasticsearch/backups
Then did:
sudo mkdir /var/lib/elasticsearch/backups
sudo chown -R elasticsearch: /var/lib/elasticsearch/backups/
sudo systemctl restart elasticsearch
curl -X PUT "localhost:9200/_snapshot/fs_backup?pretty" -H 'Content-Type: application/json' -d'
{
"type": "fs",
"settings": {
"location": "backup",
"compress": true
}
}
'
curl -X PUT "localhost:9200/_snapshot/fs_backup/snapshot_1?wait_for_completion=true&pretty"
Not sure it's ideal that the backups are inside the data dir, but hopefully ES won't mind for now.
We should create snapshots to backup the index.
We can use the Google Cloud Storage repository plugin.