Created
March 26, 2018 21:40
-
-
Save SamyCoenen/6e12cc1c22c74733c6e5fc49bcb94b67 to your computer and use it in GitHub Desktop.
Make a backup of all you indices on ElasticSearch with this Bash Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Samy Coenen | |
# Company: Gluo NV | |
SOURCE=https://............es.amazonaws.com | |
indice_list="$(curl -XGET $SOURCE/_cat/indices?pretty=true -v | cut -d $' ' -f3)" | |
for item in $indice_list | |
do | |
elasticdump \ | |
--input=$SOURCE/$item \ | |
--output=$ \ | |
--type=data \ | |
> "${item}elasticsearch-exported.json" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment