mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 04:22:11 +00:00
include .kibana index in elasticdump backup
This commit is contained in:
parent
4bac26bef9
commit
5d7afc86e5
2 changed files with 3 additions and 2 deletions
|
@ -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="[0;34m"
|
||||
myCOL0="[0;0m"
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue