Public Repository

Last pushed: a year ago
Short Description
Custom elasticsearch image. It's ready to be mapped as local service (listening on all interfaces)
Full Description

docker pull vyrphan/elasticsearch:1.7.2

Example to run it

docker run -d -p 9200:9200 --name elasticsearch1 -v /var/lib/elasticsearch -v /var/log/elasticsearch -v /var/backups/elasticsearch vyrphan/elasticsearch:1.7.2

-> /var/lib/elasticsearch: where elasticsearch stores data
-> /var/log/elasticsearch: elasticsearch logs
-> /var/backups/elasticsearch: here is the destiny folder for backups.

To perform backups, you can set up an shell script with the following content:

mkdir -p /var/backups/elasticsearch
chmod 777 /var/backups/elasticsearch
curl -XPUT http://127.0.0.1:9200/_snapshot/backup -d '{
"type": "fs",
"settings": {
"location": "/var/backups/elasticsearch"
}
}'
curl -XPUT http://127.0.0.1:9200/_snapshot/backup/snapshot_$(date -d "today" +"%Y%m%d%H%M") -d '{"ignoreunavailable": "true"}'
tar czf /var/backups/elasticsearch
$(date -d "today" +"%Y%m%d%H%M").tar.gz /var/backups/elasticsearch

Docker Pull Command
Owner
vyrphan