Skip to main content
In this guide, you’ll learn how to safely demote the existing primary cluster in a Vault Disaster Recovery (DR) replication setup and then promote the DR secondary cluster to become the new primary. This procedure ensures minimal downtime and maintains data integrity across clusters.
  • Vault version 1.9+ installed on both clusters
  • Network connectivity between primary and secondary
  • Root or privileged token access on both clusters
  • jq installed for JSON formatting

Quick Reference

StepActionCommand
1Verify DR replication status on primaryvault read sys/replication/dr/status
2Demote primary to secondaryvault write -f sys/replication/dr/primary/demote
3Generate DR operation token on secondaryvault operator generate-root -dr-token
4Promote secondary to primaryvault write sys/replication/dr/secondary/promote
5Verify the new primary status and peersvault operator raft list-peers

1. Verify Current DR Replication Status

On your primary cluster, confirm that the DR replication relationship is healthy:
Sample output:
If the connection_status is not connected, troubleshoot network connectivity and TLS settings before proceeding.

2. Demote the Current Primary Cluster

Demoting the primary ensures there is no conflict when promoting the secondary.
Demoting the primary will briefly interrupt Vault service on that cluster. Ensure maintenance windows and inform your team.
Expected warning:

3. Generate a DR Operation Token on the Secondary

Switch context to your DR secondary cluster to create a one-time operation token required for promotion.
  1. Initiate token generation
    You’ll receive an operation nonce.
  2. Unseal with quorum of unseal keys
    Provide any 3 of 5 unseal keys from the former primary:
    Vault returns an encoded token, e.g.:
  3. Decode the DR operation token
    Output:
The DR operation token is time-limited and can only be used once to promote the secondary.

4. Promote the Secondary to Primary

Using the decoded token, promote the DR secondary:
You’ll see:

5. Verify the New Primary

  1. Authenticate (if needed):
  2. List Raft peers:
    Expected:
  3. Test secrets engines:
At this point, your DR secondary cluster is fully promoted and ready to operate as the new primary. All write and read operations should now succeed on this cluster.

Watch Video