Migrate OpenBao storage to Raft, PostgreSQL or PebbleDB

Moving an OpenBao cluster to a different storage backend is an offline, sequenced change. This page covers the forced move off the file backend, choosing Raft or PostgreSQL, and the work that sets the outage window.

On this page

How much work an OpenBao storage migration really is

If your OpenBao cluster runs on the file backend and you need to leave it, either because a deadline is set or because the single-node storage has become a stability risk, the move is done with bao operator migrate, it needs a planned offline window, and the effort depends on three things: cluster size, the target backend you choose and how well the current state is documented. Plan for the cluster to be unavailable to clients while data is copied, and confirm the exact procedure, flags and supported source and target combinations against the current OpenBao documentation for your release before you schedule anything.

The target backend shapes operations for years, so decide it before the move rather than after. Integrated storage (Raft) keeps state inside the OpenBao nodes, which means you own node replacement, snapshots and quorum behavior, but no separate database team is needed. PostgreSQL moves that durability and replication work to a database you must also operate, back up and upgrade. The OpenBao storage documentation describes PostgreSQL as the easier backend to operate safely, and the HA documentation lists both Raft and PostgreSQL as the officially supported HA backends. Ask your platform team which skills and on-call rotation already exist for each option, and whether a PostgreSQL service you already run meets the availability and backup standards you apply to other critical data.

Effort is driven less by the copy itself than by the work around it. Inventory the current storage stanza, seal configuration, listener settings and any disable_mlock entries, since the migration guide says disable_mlock must be removed for OpenBao. Record backup and snapshot procedures, the owner of each unseal key or recovery share, and the rollback plan if the copy or the first startup on the new backend fails. A clean inventory and a rehearsal on a non-production copy usually shorten the offline window more than any tuning on the day. Ask any vendor or partner quoting this work to itemize inventory, rehearsal, cutover, verification and rollback separately, so you can see what you are paying for and what your own team must still do.

What carries over when OpenBao changes storage backend

This table compares each part of a source OpenBao cluster with how it is handled when storage moves to Raft, PostgreSQL or PebbleDB. Read each row as one of three outcomes: data the migration tool copies, configuration you rewrite, or behavior you verify after cutover. Confirm every row against the current OpenBao storage and migration documentation before planning the window, because the tool's exact scope and the handling of each item can change between releases.

Cluster elementWhat happens on the storage moveAction for the operator
Secrets in key/value and other mountsEncrypted data is copied through the migration tool into the target backendConfirm the copy is complete by comparing key counts or sample reads before cutover
PoliciesStored as data in the backend and expected to be copied by the migration toolVerify policy text and names after cutover, since policy evaluation is a check you should repeat
Auth methods and their configurationStored as data and expected to be copied, along with mount pathsTest each login path for every auth method you use, including machine logins such as AppRole
Secrets engine mounts and plugin entriesMount metadata is stored in the backend and expected to move with the dataInventory mounts before the move and confirm each one responds after cutover
Leases and dynamic credentialsLease records are backend data, but their behavior around the offline window needs checkingConfirm with the project how outstanding leases are handled and plan for consumers to renew or re-request credentials
Unseal keys and seal configurationNot moved as storage data in the same way; seal settings stay in the server configurationKeep unseal material available, and confirm that the seal type and key shares still match after restart
HA settings and storage stanzaThe storage block in the server configuration must change to the target backendRewrite the storage stanza and cluster address settings, then confirm the active node and standbys after restart
TLS certificates and listener configurationListener settings live in configuration files, not in the backendConfirm certificate paths, listener addresses and client trust chains are still valid on every node
Audit devicesAudit device configuration is server configuration and may need to be recreated on each nodeRe-enable audit devices and confirm entries are written to every destination after restart
Namespaces and their settingsNamespace data is stored in the backend, and the documentation should be checked for the move path usedConfirm the namespace tree and its mounts after cutover, and test a request into each namespace

Which documented migration path OpenBao provides

OpenBao documents one supported route for moving a cluster between storage backends: the bao operator migrate command run against a stopped cluster. The cards below cover what that route expects from the reader before a window is booked, from source and target support to node order and error handling.

Supported source and target pairs

The storage docs list which backends can serve as source and target, and the pair you need is the one that matters, not the list of backends in general. Confirm the exact source and target combination against the current OpenBao storage documentation before you plan anything, because support for a given pair can differ from support for each backend on its own. Record the pair in your change request so the rollback path is also tied to a documented route.

Storage backend docs

The forced move off file storage

Clusters on the file backend are not a good fit for production HA, and the documented migration is the expected exit path. Plan this move as a required change rather than an optional upgrade, and confirm with the project whether any file-backend cluster can be migrated in place or needs a restore into a new target. Keep a verified, restorable copy of the data directory before the first command runs.

Configuration on both sides

The source and target each need their own storage stanza, and the migrate command reads both. Prepare the target backend configuration, including data paths for Raft or connection settings for PostgreSQL, and confirm the seal configuration is identical on both sides so the unseal material still works. Keep the source configuration file unchanged until the migrated cluster has been verified.

Stop and start order of nodes

The migration needs the cluster offline, so every OpenBao node must be stopped before the migrate run and the target configuration applied before the cluster starts again. Confirm with the documentation whether the migrate command runs from one node or must run on a specific node, and in what order the restarted nodes should come up. Schedule the outage window around this sequence, not around the time the data copy is expected to take.

Progress and error reporting

The command writes progress and failures to its output, and a failed run can leave the target partially populated. Capture the full output to a log file, record the exit status, and treat any error as a stop condition that returns the source to service. Confirm in the docs how the tool behaves when it is re-run against a target that already contains data.

PostgreSQL as the target

PostgreSQL is released under the PostgreSQL License, a liberal open source license similar to the BSD or MIT licenses, and it has supported major versions with stated end dates. Choose a major version that is still inside its support window for the full life of the cluster, and confirm that the OpenBao storage docs support your chosen version. Operating PostgreSQL also requires your own backup, failover and upgrade plan, because PostgreSQL does not detect a primary failure on its own.

Oldest supported major
14
PostgreSQL versioning policy

Raft or PostgreSQL: choosing the target backend

Integrated storage (Raft) keeps cluster data inside the OpenBao nodes themselves, so no separate database service is needed. The project lists Raft as one of the officially supported HA backends, with an active node holding a lock and standbys forwarding or redirecting requests. Since OpenBao 2.5.0, Raft standbys can serve read-only operations, which gives read scaling without an external database.

  • Documented HA support: Raft is an officially supported HA backend, so leader election and replication are handled by the cluster itself.
  • Read scaling: Raft standbys serve read-only operations from OpenBao 2.5.0 onward.
  • Operating skills: your team must understand Raft snapshots, peer membership changes, and recovering a cluster that has lost quorum.
  • Ownership: the platform or security team that runs OpenBao nodes also owns storage, so there is no separate database team to coordinate with.
  • Backups: plan snapshot schedules and test restores on a non-production cluster before cutover.

Before choosing Raft, confirm with your team that they can run snapshot restores and membership changes under pressure, and read the OpenBao high availability docs for the current procedures.

How the offline window fits the storage cutover

The cutover starts with a decision to leave the file backend, then branches to Raft or PostgreSQL as the target. Backup and snapshot come first, then the cluster is frozen and stopped, which opens the offline window. bao operator migrate copies the data into the target, and the new backend starts serving only after that copy is complete. Rollback to the file backend is possible until the target starts serving, so confirm unseal, secret access and HA before closing the window.

Decision and phase sequence for moving off the file backend, with the offline window marked.

Storage migration sequence from backup to cutover

This sequence moves an OpenBao cluster to a new storage backend with a verified backup, a rehearsed migration and a documented rollback path. It ends with the old backend retired and monitoring pointed at the new layout.

  1. Inventory the current backend and cluster layout

    Record the current storage backend, the server configuration file, the unseal method (Shamir keys, auto-unseal or a seal provider), the HA layout and the OpenBao version on every node. Confirm which settings the migration will touch, such as the storage stanza and any seal stanza that must stay consistent. The step is done when a written inventory exists and each node's version and configuration have been checked against it. Ask your DeployOpen or internal reviewer to confirm that every node runs the same version before work continues.

  2. Take and verify a full backup

    Take a full, consistent backup of the current data store using the backup method that matches your backend, and store it outside the cluster's failure domain. Record the checksum and the time of capture, and keep the unseal material and root recovery keys in a separate, controlled location. The step is done when the backup file or snapshot is copied to storage you can reach during an incident and its integrity check passes. Confirm the backup procedure with the OpenBao storage documentation before you run it.

  3. Restore the backup to a separate test cluster

    Restore the backup into an isolated OpenBao cluster that has no network path to production clients, and unseal it with the same material you would need in a real recovery. Check that secrets engines, auth mounts, policies and namespaces are present and that a sample read and a sample login succeed. The step is done when the restored cluster answers the same test requests as the source and any gaps are logged as findings. This restore test is where many surprises appear, so treat any failure here as a blocker rather than a note for later.

  4. Build the target backend

    Provision the target. For Raft, create the node set with the planned count, disk and network layout and confirm each node can reach the others on the cluster ports. For PostgreSQL, deploy an instance with the supported major version, enable backups and point-in-time recovery, and create a dedicated role with the privileges OpenBao needs. The step is done when the target starts empty, accepts connections from every planned node and has a working backup job of its own. Confirm the PostgreSQL version against the project's supported list before you select it.

  5. Rehearse the migration on a copy

    Run the full bao operator migrate procedure against a copy of the source data and the target backend, using the same configuration you plan to use in production. Time each phase, record every error and warning and confirm the migrated copy unseals and serves reads. Repeat the rehearsal until it completes without manual intervention. The step is done when a rehearsal runs end to end with a written runbook that names every command, every operator and the rollback trigger. Expect rehearsal findings to change the runbook and the offline window plan.

  6. Schedule and communicate the offline window

    Agree the cutover date with the application owners, identify every service that reads from OpenBao, and confirm how each one behaves while the cluster is down. Notify the on-call group, the security team and the change board with the runbook, the rollback point and the named decision maker for a go or no-go call. The step is done when the change record is approved and every dependent team has confirmed its outage handling in writing. The offline window length should come from your rehearsal results, not from an estimate made in advance.

  7. Run the migration and verify data integrity

    Stop client traffic, seal the source cluster, run bao operator migrate with the approved runbook and start the new backend. Compare key counts, mount tables, policies, audit device configuration and a set of known secret paths against the pre-migration inventory. The step is done when the integrity checks match the inventory and a test client can read and write through the new backend. If any check fails, follow the rollback plan in the runbook and do not resume traffic.

  8. Bring up HA and test failover

    Start the remaining standby nodes, confirm one node holds the active role and the others forward or redirect requests, and confirm standby reads behave as your configuration intends. Stop the active node in a controlled test and confirm that a standby takes over and that client requests recover. The step is done when a documented failover test passes and the result is recorded. For PostgreSQL, confirm that failover of the database itself is handled by tooling you have chosen, because PostgreSQL does not detect a primary failure on its own.

  9. Update monitoring and decommission the old backend

    Point metrics, alerts and dashboards at the new backend and remove checks that only applied to the old layout. Keep the old backend and its backup read-only for the retention period set by your change policy, then remove it once the owners approve. Update the backup schedule so it covers the new backend and record the final state in the cluster inventory. The step is done when alerts fire correctly in a test and the old backend is removed or archived with a signed decommission record.

Why the file backend has to move before other changes

The storage move comes first because a cluster on the file backend is not a stable production target for high availability. The OpenBao HA documentation names integrated storage (Raft) and PostgreSQL as the officially supported HA backends, and the storage documentation lists Raft, PostgreSQL, PebbleDB and in-memory as the documented backends. A cluster still on file storage therefore sits outside the supported HA path, and that is why the move is forced rather than optional. Before you plan the window, confirm the current status of the file backend in the OpenBao storage backends documentation, since the project may change its guidance between releases. The move itself is done with bao operator migrate, which copies data from the source backend to the target backend.

Other planned work can change the cutover plan, so map it before you schedule anything. If the cluster is still on a Vault version, the OpenBao migration guide describes an in-place replacement of the server process on all nodes, and it was tested only against Vault 1.14.1 community edition. Version upgrades, unseal changes (for example, a new seal stanza) and auth method updates each alter the configuration or the data the migration must carry. Removing disable_mlock is also required on OpenBao 2.0.0 and later, and a rekey may be needed for clusters bootstrapped before Vault 1.3. Decide the order of these tasks explicitly, and record which backend the cluster is on at each step so that a rollback has a known starting point.

What drives the offline window and migration effort

This table lists the factors that change how long an OpenBao storage migration takes and how much work surrounds it, along with what to measure before asking for a quote. Read each row as a question to answer for your own cluster, since the same backend move can differ widely between a lab and a production estate. The main takeaway is that a quote should rest on a written scope and a rehearsal run against a restored copy of your data, not on a generic estimate.

DriverWhy it mattersWhat to measure before quoting
Data volume in the source backendThe migration copies every key in storage, so the amount of stored data sets the copy time that falls inside the offline window.Size of the source data directory or database, number of keys and leases, and how much of it is audit-relevant history you must keep.
Number of nodes and HA layoutEach node must be stopped, reconfigured and brought back in the right order, and a multi-node cluster adds coordination steps around the active node.Node count, which nodes are active or standby, load balancer and DNS targets, and whether the cluster spans sites.
Target backend choiceRaft adds cluster membership and snapshot setup on each node, while PostgreSQL adds a database to provision, secure, back up and patch. Each choice changes the post-migration run book.Existing database or storage team capacity, backup tooling already in use, and the internal standard for running PostgreSQL or Raft clusters.
Unseal method (Shamir, auto-unseal or other seals)Unseal keys or seal configuration must be available and tested during the window, and a seal change can add steps beyond the storage move itself.Current seal type, where unseal keys or seal credentials are held, and who must be present to perform an unseal.
Network and TLS changesNew storage endpoints, certificates, firewall rules and cluster addresses must work before the cutover, and a failed handshake can extend the window.Required ports between nodes and the new backend, certificate authorities in use, and any network policy or proxy between components.
Client and automation dependencies on endpointsScripts, CI pipelines, agents and applications that hard-code addresses or tokens can break after the change, and their owners must be engaged.Inventory of clients, agents, pipelines and configuration management that reference OpenBao addresses or use specific token types.
Backup and restore testingA migration without a verified restore path leaves no safe rollback, and the time to restore is part of the risk window.Time to take a snapshot, time to restore it into a test environment, and whether the restore has been tested end to end.
Number of environments to migrateEach environment needs its own rehearsal, change record and verification, so effort grows with the count of clusters, not with the size of one cluster.Count of development, staging, production and disaster recovery clusters, and whether they use the same configuration and seal.

What goes wrong during a storage backend move

Most failed storage moves fail before cutover, not during it. The cards below cover the preparation gaps that leave a cluster unrecoverable or unreachable once the source is sealed. Each one names the check that should be finished and signed off before the offline window opens.

No tested restore before the move

A backup that has never been restored is an assumption, not a recovery path. Before the offline window, restore the snapshot into a separate environment, unseal it with the same material, and confirm that a known secret path, a dynamic role and an audit device all work. Record the time the restore took so the window estimate is based on measured data. If the restore fails, stop and fix it before any change to the source cluster.

Incomplete or outdated backup

A snapshot taken days before cutover misses every secret written since, and a snapshot of only one node can miss Raft state held elsewhere. Take the backup immediately before the window, after writes are frozen, and store it outside the cluster's failure domain. Compare the snapshot's creation time and the last write recorded in your audit logs to confirm nothing was lost in between.

Unseal material unavailable at cutover

After migration the target must be unsealed, and the keys or recovery material must match the cluster's seal configuration. If Shamir key holders are unreachable, or an auto-unseal KMS key or HSM credential is missing from the new nodes, the cluster stays sealed with no data loss but no service. Before the window, confirm that the required number of key holders is reachable, that cloud KMS or HSM access works from the target hosts, and that the procedure is written down.

Target backend without HA

A single-node Raft or a single PostgreSQL instance can move the data correctly and still leave you with one point of failure on day one. Choose the target topology before the move: at least three Raft voters for integrated storage, or a PostgreSQL primary with a tested standby and a documented failover process. PostgreSQL does not detect primary failure or promote a standby by itself, so name the external tool or manual runbook and test it before cutover.

OpenBao HA docs

PostgreSQL without a backup and recovery plan

Choosing PostgreSQL as the target moves the secrets into a database your team must back up, restore and patch. Confirm that continuous archiving or point-in-time recovery is configured and that a restore to a specific time has been rehearsed. Check that the database role OpenBao uses has only the privileges it needs, that TLS is enforced, and that the database version is still within PostgreSQL's support window for your planned operating period.

Oldest supported PostgreSQL major
14
PostgreSQL archiving docs

Clients and monitoring left on old addresses

After the move, applications, agents, CI jobs and load balancers may still point at the previous node addresses, and dashboards may still scrape the retired endpoints. Inventory every client address and health check before the window, update them to the new endpoints, and confirm that alerts fire on the new nodes. Watch for alerts that stay silent because they reference metrics or hostnames that no longer exist.

What buyers ask before moving OpenBao storage

How much does an OpenBao storage migration cost?

No price is published, and a quote follows from the written scope. The cost comes mostly from labor: planning the target backend, rehearsing the move on a copy of your data, scheduling and running the offline window, unsealing and verifying the cluster, and handing over runbooks. Costs rise with the number of clusters, the size of the data set, how many environments need a rehearsal, and how much of the target backend you need built (for example, a PostgreSQL high availability setup or a Raft cluster across sites). Recurring costs such as backups, patching and monitoring stay with your team unless you buy a retainer. Ask any quote to list each of these items separately and to state what is excluded.

How long is the offline window for an OpenBao storage migration?

The window depends on how much data must be copied, how fast your storage and network are, and how long the rehearsal takes to verify. The bao operator migrate process needs OpenBao stopped against the source storage, so the cluster is unavailable for the duration of the copy and checks. Plan the window from a timed rehearsal on a restored copy of your production data, not from a guess. Then add time for unsealing, checking health, and rolling back if a check fails. Confirm the procedure and any required steps for your exact version with the OpenBao migration documentation before you set a change window.

Can our own team run an OpenBao storage migration without outside help?

Yes, if your team has experience with OpenBao operations, the chosen storage backend, and change control for a production secrets system. The main risks are not the copy command itself but the surrounding steps: confirming the source and target are healthy, protecting the unseal keys and recovery material, handling clients that will reconnect, and proving the restored data is complete. A partner is useful when the team lacks one of these skills or when there is no time for a rehearsal. DeployOpen plans, implements, documents and supports these migrations inside your infrastructure under a written scope, and can also work alongside your staff.

What do we need from our staff for the migration?

Plan for access, a change window and named custodians before work starts. Engineers need administrative access to the OpenBao nodes, the source storage and the target backend, and to the infrastructure that hosts them. The change window must cover the full offline period plus rollback time, and business owners must approve the outage. You also need the unseal key custodians available at the same time, because the cluster must be unsealed after the move. Name a decision owner who can call a rollback. Written handover of these roles should be part of the scope.

Should we choose Raft or PostgreSQL for OpenBao storage?

Choose based on the operating skills and failure handling you have. The OpenBao storage documentation describes PostgreSQL as an easier backend to operate safely than Raft, and both integrated storage (Raft) and PostgreSQL are supported high availability backends. Raft keeps the cluster self-contained, with no separate database to run. PostgreSQL moves replication, backups and failover planning to a database platform your team may already operate. PostgreSQL does not detect a primary failure on its own, so automatic failover requires external tooling. Since OpenBao 2.7.0 extended read-only standbys to PostgreSQL, read scaling is also a factor. Decide with a documented trade-off review before the rehearsal.

Can we roll back an OpenBao storage migration?

Rollback is possible only if you prepare for it before the cutover. Keep the source storage intact and unchanged until the target is verified, and take a verified backup of the source before the move. Document the exact steps to restart OpenBao against the original backend and confirm them in the rehearsal. Once clients have written new data to the target, returning to the source may lose those writes, so agree a cutoff point in the runbook. The rollback plan should be tested as part of the rehearsal, not written afterward.

What does a quote for this migration include?

A quote should follow directly from a written scope that lists the source and target backends, the number of clusters and environments, the rehearsal plan, the offline window and its approval, rollback steps, verification checks, documentation and handover. Ask for each deliverable and its acceptance criteria, what your staff must provide, which items are excluded (such as hardware, licenses for the database, or post-migration support), and whether retesting after a failed rehearsal is included. DeployOpen agrees scope, deliverables and timelines in writing before work starts.

How DeployOpen scopes and delivers a storage migration

DeployOpen treats a storage backend move as a fixed-scope piece of work with a written backup point, a named backend decision and a tested rollback. We plan the offline window with you, run the migration in your own infrastructure, and hand over the configuration, runbooks and verification evidence your operations team needs to run the cluster afterward.

How we scope

  • Inventory the current backend, cluster size, node count, snapshot policy and the mounts that depend on storage.
  • Record the Raft versus PostgreSQL decision with the operating skills and database services your team already runs.
  • Agree the offline window, rollback point and sign-off steps in writing before any change begins.

How we build

  • Rehearse bao operator migrate against a copy of your cluster data in a non-production environment first.
  • Remove obsolete configuration such as disable_mlock and confirm the storage stanza on every node before cutover.
  • Verify unseal, leadership, secrets reads and audit logging on the target backend before reopening the cluster to clients.

How we hand over

  • Deliver the final storage configuration, node layout and backup and restore procedure written for your team.
  • Provide a dated record of the rehearsal, cutover checks and rollback test, kept in your own documentation system.
  • Walk your operators through failover, snapshot restore and the steps to add or remove a node.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the migration is complete.
  • Plan follow-up work for OpenBao upgrades and backend maintenance so each change is scoped and tested separately.
  • Confirm with your team the support boundaries, response expectations and access model before the retainer starts.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.