Created
May 29, 2019 00:48
-
-
Save Mike-Dunton/b19b6b0b644363d6f988fa354692680f to your computer and use it in GitHub Desktop.
Move a consul tree
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 | |
PATH_FROM="some/path/with/keys/" | |
PATH_TO="some/new/path/" | |
consul kv export ${PATH_FROM} > tempfile | |
sed -i .bak s~$PATH_FROM~$PATH_TO~ tempfile | |
consul kv import @tempfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment