Elasticsearch have a snapshot and restore API to create snapshots of individual indices or an entire cluster into a remote repository.

Next, how to configure a elasticsearch repository and run backups with curator. curator is an index management for elasticsearch.

Configure path.repo in elasticsearch.yml

Edit /etc/elasticsearch/elasticsearch.yml and add next configuration:

path.repo: ['/mnt/logbackup']

Create repository in elasticsearch

Create repository using curator:

es_repo_mgr --debug --host 127.0.0.1 create fs --repository bck --location /mnt/logbackup --compression true

Create repository using curl:

curl -XPUT 'localhost:9200/_snapshot/logbackup' -d '
{
    "type": "fs",
    "settings": {
        "location": "/mnt/logbackup",
        "compress": true
    }
}'

List elasticsearch repositories

List elasticsearch repositories using curator:

es_repo_mgr show

List elasticsearch repositories using curl:

curl -GET 'localhost:9200/_snapshot/_all?pretty'

Create a snapshot with curator of all indices

curator snapshot --repository logbackup indices --all-indice