This is a simple CLI tool that can facilitate a scrappy Vault migration.
- Set
VAULT_ADDR
andVAULT_TOKEN
in your environment. You can runexport VAULT_TOKEN=$(cat ~/.vault-token)
after a successfulvault login
. - Run
vault-migrate export {kv-path} {secret-path}
, i.e.vault-migrate export bridge /
. This can be piped to a file with> export.json
. - Adjust your
VAULT_ADDR
andVAULT_TOKEN
to point at the destination server. - Run
cat export.json | vault-migrate import {kv-path}
.
This implementation is far from comprehensive and remains untested. It has worked well enough for our use-case.