You can install command line without install XCode
$ xcode-select --install
sudo docker pull elasticsearch:1.7 | |
sudo docker run -d -p 9200:9200 -p 9300:9300 -v "/data-0":/usr/share/elasticsearch/data -v "$PWD/scripts":/usr/share/elasticsearch/config/scripts elasticsearch:1.7 elasticsearch -Des.cluster.name="avengers" | |
sudo docker run -d -P -v "/data-1":/usr/share/elasticsearch/data -v "$PWD/scripts":/usr/share/elasticsearch/config/scripts elasticsearch:1.7 elasticsearch -Des.cluster.name="avengers" | |
# Local server | |
# Create new Docker Virtual machine |
var fs = require('fs'); | |
var querystring = require('querystring'); | |
var http = require('http'); | |
var indexs = JSON.parse(fs.readFileSync('indexes.json', 'utf8')); | |
var host = '192.168.186.143'; | |
port = '9200', | |
postData = "", | |
indexName = ""; |
# https://www.npmjs.com/package/elasticdump | |
git clone https://github.com/taskrabbit/elasticsearch-dump.git | |
cd elasticsearch-dump/ | |
curl -XGET http://localhost:9200/_all/_settings,_mapping > indexes.json | |
sudo docker build -t elasticdump . | |
time sudo docker run --rm -ti -v ~/dumps/:/data elasticdump --all=true --type=data --input=http://<ip>:9200/ --output=/data/data-backup.json | |
# Backup and index to a gzip using stdout: |
on write_to_file(this_data, target_file, append_data) | |
try | |
set the target_file to the target_file as string | |
set the open_target_file to open for access file target_file with write permission | |
if append_data is false then set eof of the open_target_file to 0 | |
write this_data to the open_target_file starting at eof | |
close access the open_target_file | |
return true | |
on error | |
try |