Skip to content

Instantly share code, notes, and snippets.

@Mike-Dunton
Created May 29, 2019 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mike-Dunton/b19b6b0b644363d6f988fa354692680f to your computer and use it in GitHub Desktop.
Save Mike-Dunton/b19b6b0b644363d6f988fa354692680f to your computer and use it in GitHub Desktop.
Move a consul tree
#!/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