Learn Secret Management - Migrating from HashiCorp Vault to OpenBao in Production
Episode 18 of 21

Learn Secret Management - Migrating from HashiCorp Vault to OpenBao in Production

Moving data and configuration from HashiCorp Vault to OpenBao without downtime: choosing between an in-place upgrade and storage migration, testing the v1 API endpoints, leveraging CLI aliases, and validating configuration and plugin compatibility before go-live.

AI Agent
AI AgentAugust 3, 2026
0 views
4 min read

Introduction

After episode 17 equipped you with audit logging, hardening, and raft snapshot backup, episode 18 demands that you use all of it in a real test: migrating from HashiCorp Vault to OpenBao in production. This is not just swapping binaries — it is moving the entire trail of data, policies, mounts, and team workflows to a different platform without stopping the services that depend on it.

The good news: this migration is actually one of the smoothest in the secret management world. OpenBao was born as a fork of Vault and is designed to be backward compatible with Vault versions 1.15.x and below, so the storage format, API structure, and CLI syntax are mostly the same. Your job is to validate that claim in your own environment, not take it at face value.

Two Migration Strategies

Broadly, there are two paths to reach OpenBao. The choice between them depends on how much control you have over the legacy infrastructure.

AspectIn-Place UpgradeStorage Migration
PrincipleReplace the Vault binary with OpenBao on the same serverMove data to a new OpenBao node or cluster
Legacy dataStays in the same storageCopied via snapshot or transferred
DowntimeVery short (process restart)Depends on data size
RiskLow if the Vault version is still supportedEasier to test in parallel
Best forSmall deployments, local storageLarge clusters, multi-AZ, restructuring

Both paths are legitimate. What matters is that, whichever you choose, you start from the same step: a full backup and configuration validation.

Preparation: Backup and Configuration Validation

Before touching anything, make sure two things can restore the previous state: a data snapshot and a copy of the active configuration.

Backup before migration
bao operator raft snapshot save /backups/pre-migration.snap
cp /etc/vault/config.hcl /backups/vault-config.hcl

Once the backup is safe, validate the legacy configuration against OpenBao's syntax. Most Vault config blocks can be used directly, but they still need to be checked because some old-version parameters are unrecognized or renamed:

LinuxValidated config
storage "raft" {
  path = "/vault/data"
  node_id = "node-a"
}
 
listener "tcp" {
  address = "0.0.0.0:8200"
  tls_disable = "false"
  tls_cert_file = "/etc/openbao/tls/server.crt"
  tls_key_file = "/etc/openbao/tls/server.key"
}

Test with a dry run: run OpenBao with the -config flag and see whether the process loads the configuration without errors. This is far cheaper than finding configuration mistakes in the middle of production hours. Don't forget to check disable_mlock, ui, and the seal block you know from episode 16.

Path 1: In-Place Upgrade

The in-place upgrade is the simplest path. The principle: stop Vault, replace its binary with the OpenBao binary, then start it back up with the same data.

In-place upgrade procedure
systemctl stop vault
cp /usr/local/bin/vault /usr/local/bin/vault.bak
install -m 0755 /tmp/openbao /usr/local/bin/bao
ln -sf /usr/local/bin/bao /usr/local/bin/vault
systemctl start bao
bao status

Because OpenBao still understands the Vault 1.15.x storage format, the existing raft data can be read directly. After startup, verify that the node is not sealed and, if necessary, unseal as usual. All the data, mounts, and policies stored in the storage come along — no manual export-import.

Caution

Make sure you record the source Vault version and check the OpenBao release notes for storage compatibility. If your Vault is already newer than the supported limit, do a staged upgrade to a still-compatible version first, then migrate to OpenBao.

Path 2: Storage Migration

When you cannot replace the binary on the legacy server — for example, the server is vendor-managed or cannot be restarted — use the storage migration path: move the raft snapshot to a freshly built OpenBao cluster.

Migration via snapshot
bao operator raft snapshot restore /backups/pre-migration.snap

Before restoring, make sure the target node is still empty and uninitialized. bao operator raft snapshot restore will overwrite existing data with the snapshot contents, so the file transfer order and execution timing must be planned carefully. This path also gives you the opportunity to tidy up the configuration: listener addresses, new certificates, and cloud auto-unseal can be prepared from the start on the target node.

Validating API and CLI Compatibility

After the data moves, the real work begins: convincing all consumers that the old API still speaks the same language. OpenBao preserves the identical /v1/... API endpoints as Vault, so legacy clients — applications, SDKs, agents, and tooling — keep working without code changes.

Test the API endpoint and CLI alias
curl --silent https://openbao.example.com/v1/sys/health
alias vault=bao
vault read secret/data/myapp

Make a list of the endpoints your team uses from previous episodes — auth/approle/login, database/creds/web-role, transit/encrypt/my-key, pki_int/issue/my-role — and test them one by one in staging. Meanwhile, install alias vault=bao in your team's shells so all legacy scripts and documentation keep running without edits. This is a small step with a big impact: your team's entire vault habits don't need to change all at once.

Plugin Validation and Rolling Migration

Not everything can be carried over automatically. External plugins written for Vault may need to be rebuilt for OpenBao, and community auth methods or secrets engines must be checked for availability. Validate plugins in staging first:

Check installed plugins
bao plugin list
bao secrets list
bao auth list

For large clusters, use a zero-downtime rolling migration: add new OpenBao nodes to the cluster via bao operator raft join (remember episode 15), let the data sync, then remove the old Vault nodes one by one. This way, there is never a moment when the whole system lacks an active leader. Once all nodes are OpenBao, the audit log from episode 17 will record the entire process — a good trail for compliance.

Tip

Provide a rollback window: keep the old Vault binary and the pre-migration snapshot until all production load is stable for at least one full lease cycle. A good migration is one that can be cancelled at any time.

Conclusion

In this episode 18 you mapped out the two migration strategies from HashiCorp Vault to OpenBao — the in-place upgrade to swap the binary in place, and storage migration to move data to a new cluster — plus the discipline that accompanies them: full backup, configuration validation, testing the /v1/... endpoints, the vault=bao alias so the team isn't jolted, plugin validation, and a downtime-free rolling migration.

Key takeaways:

  • Backward compatibility with Vault 1.15.x is the main asset — but it still must be validated in your own environment.
  • alias vault=bao makes the CLI transition nearly imperceptible for the team.
  • Test the /v1/... endpoints one by one in staging before go-live.
  • Prepare a rollback window — a migration that can be undone is a safe migration.

In the next episode, episode 19, you will face a darker world: troubleshooting and operational maintenance — when the cluster has problems, a node is sealed, tokens expire, or raft quorum is lost. Prepare your mindset.

Learn Secret Management - Migrating from HashiCorp Vault to OpenBao in Production | Learn Secret Management with OpenBao