Recovering a broken OpenBao cluster with recovery mode

OpenBao's -recovery flag gives direct storage access when a bug stops the server from starting. This page explains when to use it, what stays disabled, and how to limit the risk of editing storage.

On this page

When OpenBao recovery mode is the right tool for a failed start

A cluster that will not start after an upgrade, or after a suspected bug, puts you in a narrow decision: is recovery mode the next step? Recovery mode is started with the -recovery flag and gives direct access to the storage backend when a fault prevents the server from starting normally. It is a last-resort path, not a repair tool for everyday failures. For most startup problems, the first step is to find out why the server is failing, and the diagnose topic in this operations group explains how to run bao operator diagnose to check configuration, storage, listeners and seals. If the diagnostics point to a configuration error, a seal problem or a storage connection issue, recovery mode is usually the wrong tool.

Recovery mode changes what the server runs. Subsystems that serve normal requests do not start, so you should not expect secrets engines, auth methods or client traffic to behave as they do in a healthy cluster. Confirm the exact list of inactive subsystems in the OpenBao documentation for your version before you rely on it. Also record the running version and compare it with the OpenBao releases page, since a known bug may already have a fixed release. The upgrade topic in this group covers version-specific changes that can cause startup failures after a move to a new minor line.

Editing storage directly carries the highest risk on this path. Entries in the storage backend are written by OpenBao under its own rules, so a manual change can corrupt data or leave the cluster in a state that is hard to reverse. Before any change, take a verified backup of the storage backend, note the node, configuration and version involved, and write down each change you plan to make. Ask your vendor or the project for guidance if the fix is not clearly documented for your storage backend. Plan for a restore path first, because a recovery attempt that goes wrong may leave you with fewer options than the original failure.

Deciding between diagnostics, rollback and recovery mode

This sequence moves from the least invasive check to the most invasive option, so the team reaches recovery mode only after diagnostics and rollback have failed or been ruled out. It produces a written record of what failed, what was tried and why recovery mode was chosen.

  1. Confirm the failure occurs at startup

    The operator who owns the cluster confirms that the problem blocks the server from starting, not that it degrades a running node. Capture the binary version, the configuration file in use, the time of the first failed start and the first error lines from the service log. Store these in the incident record. The step is complete when someone other than the person who saw the failure can read the record and reproduce the same startup error.

  2. Run configuration and storage checks

    The platform engineer runs the bao operator diagnose command, covered on the troubleshooting page, against the same configuration. The checks cover the configuration file, the storage backend, listeners and seal settings. Diagnose can report false warnings on a healthy running server, so compare each finding with the logs before acting on it. The step closes when every check has a saved pass or fail result and each failure has a named cause or an explicit unknown.

  3. Take a fresh backup or storage snapshot

    Before any step that touches data, the storage owner takes a new backup or storage snapshot and stores it outside the failing nodes. Rollback and recovery mode both read or write the data directory, so an older backup is not enough. Confirm the copy is readable by restoring it to a separate environment or by checking it with the tooling your storage backend provides. The step is complete when the snapshot identifier, timestamp and checksum are recorded and the restore check has passed.

  4. Roll back to the previous binary

    If the failure began after an upgrade, the platform engineer reinstalls the previous known-good binary and starts the server with the same configuration and data directory. Check the release notes and upgrade documentation to confirm the older version can read data written by the newer one, since a version change may alter storage. Do not assume a downgrade is safe. The step closes when the server starts and reports healthy, or the attempt and its logs are recorded as a failed rollback.

  5. Decide whether recovery mode is justified

    The incident owner, with the security and storage leads, decides whether recovery mode is the only remaining path. Recovery mode gives direct access to storage while the normal subsystems stay off, so it is a last resort for a bug that blocks startup. Confirm that the rollback failed or is unsafe, that the snapshot is verified and that a named person accepts the risks of editing storage. The step closes with a signed decision that names the reason, the operator and the attached evidence.

  6. Record the decision and the next action

    The incident owner writes a summary of each completed step, its result and any step skipped with the reason. The summary names the snapshot to restore if the next action goes wrong and the person who approved any data-touching action. If recovery mode is chosen, the next section sets out how to start it and which subsystems stay unavailable. The step is complete when the record is stored with the incident and reviewed by a second engineer.

Recovery mode bypasses the failed startup path and goes straight to storage

The path starts with an operator who launches the failed server's OpenBao binary with the recovery flag. That process reads and writes the storage backend directly, so the operator's admin access to the host and the storage is the trust boundary to protect. The operator inspects or repairs the data, then restarts without the flag to return to normal startup. Before restarting, check who could reach the storage during the session and record what was changed.

Recovery mode gives the operator direct storage access, then hands back to normal startup.

What does not run in recovery mode

Recovery mode is meant for repairing storage, so the normal client-facing request path should be treated as unavailable until the documentation confirms otherwise. Plan for ordinary API calls, logins and token checks not to behave as they do on a running cluster, and make sure your team does not depend on applications reaching the node during the window.

  • Client API traffic: Assume normal requests to secrets and system endpoints will not be served. Confirm which paths, if any, respond in recovery mode.
  • Login and auth methods: Do not plan on AppRole, JWT/OIDC, LDAP or other auth methods issuing new tokens during recovery. Confirm which auth backends load.
  • Token and policy evaluation: Existing tokens and ACL policies may not be enforced the way they are on a normal start. Confirm how policy checks behave.
  • Listeners and health checks: Load balancer health checks may report the node as down. Document that expected failure in your runbook so it is not mistaken for a new fault.

Before you schedule a window, check these points in the recovery documentation and the release notes for your exact version, and record what your build actually serves.

Recovery options compared: diagnostics, rollback, storage snapshot and recovery mode

This table compares the four responses to a failed OpenBao start by what each changes, what it risks, the skills it needs and when it fits. Read it top to bottom: the less invasive options should be tried first, and recovery mode belongs at the end because it edits storage directly. The main takeaway is that a verified storage snapshot must exist before any direct storage work begins.

OptionWhat it changesMain riskWhen it fits
Diagnostics with bao operator diagnoseNothing. It reads configuration, storage, listeners and seals and reports findings.Low. Some checks can report false warnings on a running server, so confirm each finding before acting on it.First step after any failed start, to find the failing check before changing anything.
Configuration or binary rollbackReverts the server binary or configuration file to the last version that started cleanly.Medium. A rollback across a version change can fail if storage was already written in a newer format. Confirm the supported downgrade path with the OpenBao release notes.The failure began right after an upgrade or config edit, and the prior version and config are still on hand.
Storage snapshot restoreReplaces the storage contents with a copy taken before the failure. Data written after the snapshot is lost.Medium to high. Restoring the wrong snapshot or restoring over a live cluster can cause data loss. Confirm the snapshot is consistent and tested before relying on it.Diagnostics and rollback have failed, and the team has a tested backup taken while the cluster was healthy.
Recovery mode with -recoveryStarts OpenBao with direct storage access so that storage entries can be read and edited. Most subsystems do not run.High. Incorrect edits can corrupt data permanently, and recovery mode does not protect against mistakes. Take a storage snapshot first.A bug blocks normal startup, the team has a verified snapshot, and an engineer experienced with the storage backend is available to make the edit.

Risks of editing storage directly

Recovery mode gives direct access to the storage that holds OpenBao's encrypted state, so a mistake is not limited to one API call. The cards below cover the failure modes that matter most, and each one depends on which storage backend the cluster uses.

Corrupting Raft or PostgreSQL data

Storage edits change the records OpenBao reads on every request. On integrated storage (Raft), a bad write can damage the replicated log that every node depends on, so the cluster may fail to form quorum after a restart. On PostgreSQL, a bad statement can break the table layout or the keys OpenBao expects. Before any change, take a consistent snapshot of the backend. The OpenBao storage docs describe PostgreSQL as easier to operate safely than Raft, so a Raft cluster needs more careful snapshotting and a tested rollback path.

Storage backend docs

Encrypted values that stay unreadable

OpenBao encrypts values before writing them to storage. Editing or copying ciphertext does not produce readable data, and a value written under one key cannot be decrypted without the matching unseal state and keyring. If you move or rewrite entries while the barrier is in a different state, the result can be secrets that no node can read. Confirm the unseal method and keyring history before you touch any encrypted entry, and record which key version each affected path uses.

Partial edits across HA nodes

In an HA cluster, one active node holds the lock and standbys forward or redirect requests. Recovery mode is typically run on one node, but storage is shared, so a change made from one node reaches every node that reads the same backend. If you edit one node's view, or restart nodes at different points in the procedure, the cluster can disagree about what the data says. Stop all nodes that could write, make the change once, and confirm every node reaches the same state before you return it to normal service.

Losing the audit trail

Audit devices record requests made through the API. Direct storage edits bypass that path entirely, so nothing in the audit log shows who changed a policy, token, lease or mount during recovery. Before you begin, confirm which audit devices exist and where their output goes, and capture the current state of anything you plan to change. Write a change record with the time, the operator, the exact keys touched and the reason, so the change is still reviewable after the incident.

Changes that reappear after restore

A storage edit that fixes the live cluster can be undone by the next restore from an older backup. Backups taken before the fix will bring back the broken state, and any replica or disaster recovery copy that was not corrected will do the same. After recovery, take a fresh backup, confirm that restoring it reproduces the fixed state, and update the runbook so the change is not lost. Ask your team who owns backup retention and whether the restore path has been tested recently.

Running recovery mode safely, step by step

This sequence turns an ad hoc storage repair into a controlled, reversible change, so that a single node can be restored to a known state before the rest of the cluster is brought back.

  1. Freeze writes and open change control

    The platform owner and the security lead agree on a change window, pause automated jobs that write secrets or change policies, and tell application teams that secret writes will be blocked. Record who holds the change and who can stop it. Done when the change ticket names the cluster, the nodes, the trigger bug or error, and the person who will approve each subsequent step.

  2. Take and verify a storage backup

    Before any startup attempt, capture a backup or a storage-level snapshot of the data store, whether that is the Raft data directory or the PostgreSQL database. Store it outside the failing nodes and confirm it can be read back by restoring it to a scratch location. Done when the restore test succeeds and the checksum or snapshot ID is written into the change ticket. Confirm the backup method for your storage backend in the OpenBao storage documentation for your installed version.

  3. Record version and configuration

    Capture the exact running binary version, the server configuration file, the storage and seal settings, and the list of nodes and their roles. Keep these alongside the backup. This is the baseline you return to if the recovery attempt goes wrong, and it tells you which release notes and bug reports apply. Done when the version string and configuration hash are attached to the ticket and a second engineer has reviewed them.

  4. Start one node in recovery mode

    Stop the other nodes so that only one instance can touch storage, then start that node with the recovery flag and the same configuration. Expect a limited set of subsystems: the server exposes direct storage access for inspection and repair, and normal request handling, auth, and secrets engines are not available. Confirm the exact flag and any companion commands in the OpenBao docs for the installed version. Done when the node logs show it has started in recovery mode and no other node is running against the same storage.

  5. Make the smallest change needed

    Using the documented recovery tooling only, identify the single key or record that the failing bug depends on and change or remove only that item. Do not edit several keys in one pass or fix unrelated problems on the same visit. Write down each key touched, its previous value, and why. Done when the change log lists exactly one intended edit per step and the backup from earlier can still be used to reverse it.

  6. Verify with a read and a diagnosis

    Restart the node in its normal mode on the same data, then perform a read of a known non-sensitive secret or the health endpoint, and run the diagnostic checks against the node. Compare the result with the expected state recorded in step three. Done when the read returns the expected value, the diagnostic output shows no new errors, and the audit device, if enabled, records the request. If the read fails, stop and restore from the backup rather than making a second edit.

  7. Return to normal startup and rejoin nodes

    Confirm the recovered node runs in standard mode with its usual configuration, then bring the remaining nodes back one at a time, checking that each joins the cluster and that the active node and standby roles are as expected. Watch for version mismatches between nodes. Done when every node reports healthy, the cluster has one active node, and the change ticket records the final state before writes are re-enabled.

  8. Close the change and review the cause

    Re-enable writes in stages, confirm the automated jobs resume without errors, and record the root cause as far as it is known. Check the OpenBao releases for fixes to the bug and plan an upgrade if one applies. Done when the change ticket is closed with the backup reference, the edits made, the verification results, and a follow-up item for the underlying defect.

Security and audit considerations during recovery

Recovery mode gives direct access to the storage layer, which sits below OpenBao's own access controls and audit devices. The cards below cover who may run it, how that access is recorded, how unseal and root material is handled, and how to review secrets after a failed start.

Limit who can run recovery

Recovery mode bypasses the normal request path, so the people allowed to start a node with the -recovery flag should be a short, named list agreed before an incident. Treat the step as a privileged change: record who was granted host access, who ran the command and why. Confirm with your own change process whether a second approver is required before a recovery start on a production cluster.

Log host and storage access

OpenBao's audit devices record requests made through the API, but they do not record shell sessions, file reads on the storage host or edits made directly to the data store. Capture those events with host-level logging, such as shell session recording, file integrity monitoring on the storage directory and cloud audit logs for disk or database snapshots. Confirm which of these your environment already keeps and for how long.

Protect unseal material

Recovery work often happens while unseal keys or recovery keys are being gathered from several custodians, which is a risky moment for copies made in chat, tickets or shared drives. Plan the ceremony so custodians enter their share directly, keep the number of people present to the minimum, and confirm where each share is stored afterward. Rotate any key material that was displayed, copied or exposed during the incident.

Handle root credentials

A root token created or used during recovery is high-impact and should not outlive the incident. Revoke any root token once the cluster is healthy, record the revocation, and confirm that no automation or operator notes keep a copy. Where a root token was generated for the work, check that its use is traceable to a named person through your change records.

Snapshot before editing

Before any direct change to storage, take a copy of the data directory or a database backup and store it under separate access control. Hash the copy so that later comparisons can show whether the state changed. Verify that the snapshot can be restored in a test environment, because an edit that cannot be reversed turns a recovery into a new incident.

Review secrets after a failed start

A failed start can leave secrets in logs, crash dumps, shell history, configuration copies or temporary files, and some of them may have been read during the repair. After recovery, list the secrets stored in the affected mounts, check logs and terminal histories from the incident window, and rotate any value that may have been seen. Confirm your rotation procedure for each dynamic and static secret type before the review starts.

Questions teams ask before recovering a broken OpenBao cluster

Can our own team run OpenBao recovery mode without outside help?

Yes, if your team has people who can read the storage backend directly, work from verified backups, and keep changes in a controlled record. Recovery mode gives direct access to storage, so the work is less about the flag and more about whether someone on the team understands the data layout, can reason about what each change does, and can roll back. Teams that have never restored an OpenBao cluster from backup, or that cannot test on a copy first, usually find the risk and the time hard to judge. Confirm your team's skills against the steps on this page before you commit to doing it alone.

What do we need to provide before a recovery engagement starts?

A recovery engagement needs read access to the failing cluster's configuration, logs and storage location, plus a current, verified snapshot or backup of the storage data. You also need a test copy of the cluster, ideally on the same OpenBao version and storage backend, so changes can be rehearsed before anything touches production. Expect to agree on a maintenance window, a named owner who can approve each step, and a rollback plan. Ask the provider to list these items in the written scope so nothing is discovered mid-work.

Why does the storage backend change how hard recovery is?

The storage backend decides how data is laid out and how safely it can be inspected and edited. OpenBao documents integrated storage (Raft), PostgreSQL, PebbleDB and in-memory backends, and notes that PostgreSQL is easier to operate safely than Raft. Raft recovery usually involves reasoning about the replicated log and snapshots on each node, while PostgreSQL recovery depends on database-level tools and backups. Confirm which backend your cluster uses and whether your team has operators who know it well, because that knowledge often decides the effort more than anything else.

What makes a recovery take longer or cost more?

The main drivers are the storage backend, cluster size, how much data is unreadable, and how far the running version is from the version that caused the failure. A larger cluster means more nodes and snapshots to check and more time to confirm consistency. Wider damage means more data to validate and possibly rebuild. Version gaps matter because the bug, the fix and the documented migration path may differ between releases. Costs split into the time of your staff, any provider time for assessment and execution, and test infrastructure. Ask for a quote that itemizes each of these drivers.

How long will recovery take for our cluster?

No duration can be given without knowing the failure, so the honest answer is that it depends on what is broken and how much of the data is affected. A scoped assessment is the reliable way to get an estimate: it identifies the failure, confirms the backend and version, checks whether backups are usable, and sets out the steps and their order. Ask the provider to state the assumptions behind any timeline in writing, including what happens if the assessment finds more damage than expected.

What risks come with editing OpenBao storage directly?

Editing storage bypasses the normal write path, so a wrong change can corrupt secrets, leases, policies or the cluster's ability to elect a leader, and some damage may not be visible until a later restart. Recovery mode also does not run every subsystem, so you should not expect normal API behavior while you work. Before any edit, take and verify a backup, record every change, and confirm that you can restore the original state. Treat storage edits as the last resort after diagnosis rules out simpler fixes.

When should we bring in outside help for a broken OpenBao cluster?

Bring in outside help when the cluster holds secrets that other systems depend on, when no one on the team has restored OpenBao before, when the backups are unverified or incomplete, or when the failure appears after an upgrade or migration. Outside help is also worth considering when a compliance or audit obligation requires a documented, reviewable recovery record. DeployOpen plans, implements, backs up, upgrades, documents and supports self-hosted open-source platforms in your own infrastructure, so an assessment can be scoped in writing before any work starts, and most engagements are fixed-scope.

Does DeployOpen issue a compliance attestation for a recovery?

No. DeployOpen can help prepare systems, controls and evidence for compliance assessments, such as a written recovery procedure, change records and verification results. Independent auditors and certification bodies decide whether those controls meet a requirement. Ask the provider to define which evidence will be delivered in the written scope so that your assessor receives it in a usable form.

Limits to confirm in your environment

Recovery mode is a narrow tool, and its behavior depends on your OpenBao version, your storage backend and how your cluster was first bootstrapped. The cards below list what to confirm with the project documentation or a test cluster before you start a recovery on production data.

Inactive subsystems for your version

Recovery mode does not start the normal server subsystems, so requests that depend on them will not work while you repair storage. Check the current OpenBao documentation for your exact version to see which subsystems are inactive, and confirm that the operations you need, such as reading the storage contents or writing a fix, are available. Do this on a test cluster built from a copy of your configuration before the incident, not during it.

HA docs

Known fixes in later releases

Before editing storage by hand, check whether the startup failure is already fixed in a later patch release. The OpenBao release notes list fixes by version, and the most recent releases in the supplied set are v2.7.1 and v2.6.4. Upgrading may be a safer route than a manual repair, but confirm that the upgrade path from your current version is supported first.

Release notes

Raft-specific recovery behavior

Integrated storage (Raft) holds the cluster state on each node, so a repair must be coordinated across every member and must not diverge them. Confirm how your version handles Raft snapshots and peer membership, and whether the damaged node can rejoin after recovery. Keep a verified snapshot of each node before you change anything.

Storage docs

PostgreSQL-specific recovery behavior

With PostgreSQL as the storage backend, the database holds the data and the lock used for active node selection, so direct edits affect every node at once. Confirm with the documentation how locking and standby reads behave for your version, and use database backups and point-in-time restore as your primary rollback. The docs describe PostgreSQL as easier to operate safely than Raft, which affects how much manual repair you should plan for.

HA docs

Rekey needs for older clusters

Clusters bootstrapped before Vault 1.3 may need a rekey before they can run on OpenBao, so a cluster inherited from that era may already carry a pending step. Check the bootstrap history and seal configuration before you start a recovery, since changing the unseal material during an incident adds a second failure point. Plan any rekey as its own change with a tested procedure.

Migration guide

Migration guide test coverage

The OpenBao migration guide was tested only against Vault 1.14.1 community edition, not Vault Enterprise. If your cluster came from Vault Enterprise or a different Vault release, treat the guide's steps as unverified for your case and confirm each step on a test copy. Ask the project or your own engineers which Vault versions your data has passed through.

Migration guide

What to do after a successful recovery

Once the server starts normally, the first job is to confirm that it is healthy before anyone treats the incident as closed. Run bao operator diagnose against the configuration and check storage, listeners and seals, and treat any warning as something to explain rather than ignore. Recovery mode bypasses normal subsystems, so the diagnose output, the server logs and a test read and write through the normal API are the evidence that the cluster is back in service. Keep a copy of the output and the exact OpenBao version in the incident record, because a later reviewer will need to know what state the cluster was in when it was declared healthy. If the cluster is an HA deployment, check that every node has rejoined and that the active node and standbys agree on the cluster state before you move on.

Next, review audit and lease state. Confirm that audit devices are writing again and that there is no gap in the audit trail covering the outage and the recovery session, since an operator who edited storage directly must be accounted for. Inspect the lease state for dynamic secrets and tokens, because an interrupted or edited storage layer can leave leases that are orphaned, duplicated or not revoked as expected. Restore normal monitoring at the same time: confirm that your metrics scrape and alerting are working against the recovered node, and that alerts which were silenced during the incident are re-enabled. Document the root cause in writing, including the bug or misconfiguration, the storage changes made and who approved them. If the failure came from a known bug, check the OpenBao releases page and plan the upgrade to a supported release such as v2.7.1, which was released on October 1, 2026, with the minor line and test environment confirmed before the change window is booked.

Finally, test a restore from backup before you rely on the backup for the next incident. Recovery mode is a last resort, and a backup that has never been restored is an assumption rather than a control. Restore into an isolated environment, run the same diagnose checks and confirm that known secrets, policies and auth configuration read back correctly. Record how long the restore took and which steps needed manual intervention, and ask whoever maintains your backup tooling to confirm the restore procedure for your storage backend. The cost of this work is mostly internal staff time and a separate environment, and it recurs whenever the cluster or its backup process changes. An implementation partner can scope this as a fixed piece of work, but the quote should name the environment, the number of restore drills and who signs off the results.

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.