Skip to content

Instantly share code, notes, and snippets.

@GuyBarros
Created December 5, 2018 09:52
Show Gist options
  • Save GuyBarros/c7534cfcb5653a525f50c7679bcf7131 to your computer and use it in GitHub Desktop.
Save GuyBarros/c7534cfcb5653a525f50c7679bcf7131 to your computer and use it in GitHub Desktop.
Vault DR Cheat Sheet
What you'll need:
<recovery key of the primary>
<root token of primary>
Step 1 - begin process
vault operator generate-root -dr-token -init -tls-skip-verify
Step 2 - Generate DR Token (repeat one per key shard)
vault operator generate-root -tls-skip-verify -dr-token -nonce=<nonce value from step 1> <recovery key of the primary>
Step 3 - Decode token
vault operator generate-root -tls-skip-verify -dr-token -decode="<encoded token from step 2>" -otp="<otp from step 1>"
Step 4 - Activate Vault!!
vault write -tls-skip-verify /sys/replication/dr/secondary/promote dr_operation_token="<decoded token from step 3>"
Step 5 - Login to Vault using your original Primary Token
vault login -tls-skip-verify <root token of the primary>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment