Last active
August 22, 2017 08:28
-
-
Save Raboo/884efd8b9f12899341df1a5e2fad9e73 to your computer and use it in GitHub Desktop.
A one liner to migrate data from consul kv to etcd kv.
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
./consul kv get -http-addr=[CONSUL ADDR]:8500 -recurse | grep : | cut -d: -f1 | while read line ; do ./consul kv get -http-addr=[CONSUL ADDR]:8500 $line |head -c-1 | ./etcdctl --endpoints http://[ETCD ADDR]:2379 set $line ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment