diff --git a/bin/dump_es.sh b/bin/dump_es.sh index d496a98e..9ed82b9b 100755 --- a/bin/dump_es.sh +++ b/bin/dump_es.sh @@ -20,7 +20,7 @@ trap fuCLEANUP EXIT # Set vars myDATE=$(date +%Y%m%d%H%M) -myINDICES=$(curl -s -XGET ''$myES'_cat/indices/' | grep logstash | awk '{ print $3 }' | sort | grep -v 1970) +myINDICES=$(curl -s -XGET ''$myES'_cat/indices/' | awk '{ print $3 }' | sort | grep -v 1970) myES="http://127.0.0.1:64298/" myCOL1="" myCOL0="" @@ -41,5 +41,5 @@ for i in $myINDICES; # Build tar archive echo $myCOL1"### Now building tar archive: es_dump_"$myDATE".tgz" $myCOL0 -tar cvf es_dump_$myDATE.tar tmp/* +tar cvf es_dump_$myDATE.tar tmp/. echo $myCOL1"### Done."$myCOL0 diff --git a/bin/restore_es.sh b/bin/restore_es.sh index 506a5c8c..9a461c6d 100755 --- a/bin/restore_es.sh +++ b/bin/restore_es.sh @@ -42,6 +42,7 @@ tar xvf $myDUMP # Build indices list myINDICES=$(ls tmp/logstash*.gz | cut -c 5- | rev | cut -c 4- | rev) +myINDICES+=" .kibana" echo $myCOL1"### The following indices will be restored: "$myCOL0 echo $myINDICES echo