Skip to content

Instantly share code, notes, and snippets.

@goldblade
Created January 6, 2020 15:10
Show Gist options
  • Select an option

  • Save goldblade/2552c3a3a6de9f4d4c1f35f5bc536d4c to your computer and use it in GitHub Desktop.

Select an option

Save goldblade/2552c3a3a6de9f4d4c1f35f5bc536d4c to your computer and use it in GitHub Desktop.
Elasticdump
#!/bin/sh
QA_INDEX=
QA_OLD_HOST=
QA_NEW_HOST=
if ! type elasticdump > /dev/null; then
echo "Installing elasticdump"
yarn global add elasticdump
echo "asdf reshim"
asdf reshim
fi
echo "Begin copy data of type analyzer"
elasticdump \
--input=$QA_OLD_HOST \
--output=$QA_NEW_HOST \
--type=analyzer
echo "end copy data of type analyzer"
echo "Begin copy data of type mapa"
elasticdump \
--input=$QA_OLD_HOST \
--output=$QA_NEW_HOST \
--type=mapping
echo "end copy data of type mapa"
echo "Begin copy data"
elasticdump \
--input=$QA_OLD_HOST \
--output=$QA_NEW_HOST \
--type=data
echo "end copy data"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment