Scheduled Raft snapshots to S3 from the OpenBao Helm chart

How to enable the OpenBao Helm chart's snapshot CronJob to write Raft snapshots to S3, scope its policy, and prove a restore works before you need one.

On this page

Why scheduled Raft snapshots to S3 matter for OpenBao on Kubernetes

A platform team running OpenBao with integrated Raft storage on Kubernetes keeps its secrets state inside the cluster it operates. Raft replicates data across the pods of the cluster, which protects against losing a single pod, but replication does not protect against deleted volumes, a failed upgrade, an operator error or the loss of the cluster itself. OpenBao's high availability documentation describes integrated storage as a supported HA backend, and an off-cluster copy of its state is the control that makes those failures recoverable. The OpenBao Helm chart includes a snapshot agent that runs as a CronJob, takes Raft snapshots on a schedule and writes them to an S3 bucket outside the cluster. Teams usually need it once OpenBao holds production secrets, encryption keys or PKI state.

A snapshot is only useful once a restore has been tested. A successful CronJob run and a new object in the bucket show that the write worked, not that the file can rebuild a working OpenBao cluster. Before relying on the schedule, confirm which snapshot and restore procedure your chart version supports, who holds the S3 credentials, which IAM permissions those credentials carry, and how long the bucket keeps old objects. Plan a restore into a separate namespace or cluster, confirm how the restored cluster is unsealed, then check that the expected secrets engines, auth methods and policies are present. Record how long each step took, since that time becomes your recovery estimate. OpenBao's Raft snapshots also do not replace the etcd backup plan for the Kubernetes control plane, so cover both.

What the snapshot agent CronJob does and does not cover

The CronJob automates one step: a scheduled call to OpenBao's Raft snapshot API that writes a copy of cluster state to object storage. Each card below marks a boundary you need to check before you rely on that copy for recovery.

The CronJob's role

The chart's snapshot agent is a Kubernetes CronJob. On each scheduled run it starts a pod that authenticates to OpenBao, requests a Raft snapshot, and uploads the result. It does not restore anything, reconfigure the cluster or check that the snapshot is readable. Confirm in the chart values which schedule, image and service account the CronJob uses, and whether it targets the active node or any reachable pod. A failed run only shows up in the Job status unless you alert on it.

OpenBao HA docs

The Raft snapshot API

The job calls the snapshot endpoint at sys/storage/raft/snapshot, which exists only when OpenBao uses integrated Raft storage. The token or Kubernetes role behind the job should be able to read that path and nothing else. Confirm the exact capability the endpoint requires against the current OpenBao documentation, then test that a narrower policy still produces a snapshot. If the cluster uses a different storage backend, this CronJob does not apply and you need a different backup method.

Storage backend docs

Where the output goes

The snapshot is uploaded to the S3 bucket named in the chart values, authenticated with credentials held in a Kubernetes Secret. Anyone who can read that Secret can usually read or delete the backups, so restrict its access and scope the bucket policy to the upload path. Ask the storage team to confirm encryption at rest, versioning, object lock and lifecycle expiry on the bucket, since these decide whether a backup can be deleted or overwritten by mistake.

What the snapshot holds

A Raft snapshot captures the replicated OpenBao data store, including secrets, policies, auth configuration and lease state, in the form OpenBao stores it. Your team must confirm how the snapshot is protected and what a restore requires. Unseal keys, recovery keys and any external seal configuration are not part of the snapshot, so they must be stored and tested separately. Without them, a restored snapshot may be unreadable.

Kubernetes-level backups

The snapshot covers OpenBao's data only. It does not capture Helm values, the Kubernetes manifests that run the pods, the Secret holding S3 credentials, persistent volume configuration or the cluster's own etcd. Those need their own backup path, such as GitOps repositories for manifests and an etcd snapshot procedure for the control plane. Plan the restore order across both layers so you can rebuild the platform before loading OpenBao data.

Kubernetes etcd docs

Restore testing

A snapshot that has never been restored is only an assumption. Schedule restore tests into an isolated cluster with the same OpenBao version, storage layout and unseal method as production. Record how long the restore takes, which credentials were needed and whether applications reconnect without manual changes. Ask your provider to confirm how restore tests are scoped and documented, since this is the step most often skipped after the CronJob goes live.

Configuration options and when each fits

This table compares the decisions a team makes when enabling the snapshot CronJob: how often snapshots run, how long they are kept, which storage endpoint and credential method to use, and how the bucket is protected. Read each row as a trade-off, then confirm the matching key in your chart values and your storage provider's documentation before you choose.

DecisionOptionsTrade-offWhat to confirm
Schedule frequencyHourly, daily or a mix of bothMore frequent snapshots shrink the window of data you could lose but add storage writes and load on the leaderThe cron expression set for the snapshot agent and how long a single snapshot takes on your largest Raft data set
Retention and pruningKeep a fixed count of objects or a time window enforced by a lifecycle ruleLonger retention raises storage cost and makes it harder to know which snapshot is safe to restore; short retention leaves little room to recover from late-discovered corruptionWhether the chart prunes old objects or whether you rely on a bucket lifecycle rule, and that the rule cannot delete the newest snapshots
S3 endpoint typeAWS S3 or an S3-compatible service such as Ceph object storageAWS S3 needs no custom endpoint settings; S3-compatible services need an endpoint, path-style addressing and a region value that the service acceptsThe endpoint, region and addressing style your storage service requires, and that the agent can reach it from the OpenBao namespace
Credential methodStatic access keys in a Kubernetes Secret or workload identityStatic keys are simple to set up but must be rotated by hand and are readable by anyone who can read the Secret; workload identity removes long-lived keys but depends on cluster and cloud trust setupWhether your cluster supports workload identity for the target provider, and who can read the Secret in the release namespace
Bucket encryptionServer-side encryption with provider-managed keys or customer-managed keysProvider-managed keys need no extra setup; customer-managed keys add key policy work and a dependency on the key service for every restoreWhich encryption your data handling policy requires, and that the agent identity can use the key if you choose customer-managed keys
Object lockObject lock in governance or compliance mode, or no lockObject lock stops early deletion, including by an attacker holding the credential, but it also blocks pruning until retention expires and must be enabled when the bucket is createdWhether your storage provider supports object lock on the bucket type you use, and how the chart's pruning interacts with locked objects
Bucket layoutOne dedicated bucket per cluster, or a shared bucket with prefixesA dedicated bucket limits blast radius and makes permissions easier to scope; a shared bucket reduces the number of buckets to manage but a single policy error can expose several clustersWhether the minimal policy can be limited to one bucket and prefix, and that each cluster's snapshots are separated by a clear path
Restore testing cadenceScheduled restore into a scratch cluster or ad hoc restore after changesScheduled tests find a broken backup early and cost compute and time each run; ad hoc tests can be skipped until an incidentWho owns the test, which snapshot it uses and where the restored cluster runs so production secrets are not exposed

Enabling the snapshot CronJob step by step

This sequence turns on scheduled Raft snapshots from the OpenBao Helm chart and sends them to an S3 bucket with narrowly scoped credentials. It ends with a completed job and a snapshot object you can locate in the bucket.

  1. Confirm integrated Raft storage is in use

    Before changing anything, the platform team checks the server configuration and confirms that the cluster uses integrated Raft storage. The snapshot agent only applies to Raft-backed clusters, so a PostgreSQL or other backend needs a different backup plan. Confirm this in the rendered configuration and on each pod, then record the current pod count and the active leader. The step is done when every pod reports the same Raft configuration.

  2. Create a dedicated S3 bucket and principal

    The cloud or storage administrator creates a bucket used only for OpenBao snapshots, with versioning and access logging reviewed against your retention policy. Next, they create an IAM principal limited to writing objects to that bucket. Confirm the exact action set with your storage provider, since the agent needs to upload snapshots and nothing broader. The step is done when the principal can write a test object to the bucket and cannot read or list other buckets in the account.

  3. Create the Kubernetes Secret with S3 credentials

    The platform engineer creates a Kubernetes Secret in the OpenBao namespace that holds the access key and secret key for the snapshot principal. Keep the credentials out of Helm values files and version control, and apply the RBAC rules so only the snapshot workload and the people who manage the namespace can read the Secret. The step is done when the Secret exists, its keys match the names the chart expects, and a list of Secrets in the namespace does not expose its contents to unrelated service accounts.

  4. Bind a read-only snapshot policy to the agent

    An OpenBao administrator writes a policy that grants read access to sys/storage/raft/snapshot and nothing else. They then bind that policy to the auth method and role the snapshot agent uses, so the agent logs in with its own identity rather than a root or shared token. Test the login from the agent's identity and confirm that a snapshot read succeeds while a write to another path is denied. The step is done when both checks return the expected results.

  5. Set the schedule and storage values in the chart

    The platform engineer updates the chart values for the snapshot agent: the cron schedule, the S3 bucket and region, the endpoint if you use a non-AWS S3 service, the name of the Secret from the previous step, and the auth role. Check the key names against the chart version you deploy, because they can change between releases. Store the values file in version control so the change is reviewed. The step is done when the values file renders the CronJob with the intended schedule and bucket.

  6. Render the release with a dry run first

    Run helm install or helm upgrade with the --dry-run flag against the same values file and namespace. Review the rendered CronJob, the service account, the environment variables that reference the Secret, and the absence of credentials in plain text. Compare the output with the current release so unrelated resources are not changed. The step is done when the dry run shows only the snapshot-related changes you expected and no errors from the chart templates.

  7. Apply the release and wait for the first run

    Apply the release with helm install or helm upgrade using the same values file, without the dry-run flag. Then trigger one manual job from the CronJob, or wait for the first scheduled run if the schedule is near. Watch the pod logs for an authentication success message and a successful upload. The step is done when the Helm release reports a deployed status and the job's pod exits with a success status code.

  8. Verify the completed job and bucket object

    Confirm that the most recent job shows as complete and that the bucket contains a new snapshot object with a timestamp that matches the run. Check the object size is non-zero, then record the object name and the job name in your operations log. Repeat the check after the second scheduled run. Snapshot presence alone does not prove recoverability, so a restore test in a separate environment should follow before you rely on these backups.

Writing the minimal policy on sys/storage/raft/snapshot

The snapshot agent needs one capability on one path: reading a Raft snapshot from sys/storage/raft/snapshot. It does not need root, a broad read on secret/, or any right to write policies, mount engines or change auth configuration. A snapshot is a copy of the full encrypted storage backend, so the token that takes it is a high-value credential in its own right, but the snapshot itself stays encrypted with the cluster's keys. Scoping the token to the snapshot path limits what a stolen agent token can do to taking more backups, not reading secrets through the API. Write a policy with a single path stanza for sys/storage/raft/snapshot and grant only the snapshot-read capability that the OpenBao policy docs list for that endpoint in the version you run. Confirm the exact capability names for your release before you rely on them.

The policy binds to the agent through the auth method the CronJob uses. For a Kubernetes-hosted agent, that is usually the Kubernetes auth role bound to the snapshot job's service account, so the role's token_policies field should list only this snapshot policy and no default or admin policies. Keep the role bound to one namespace and one service account name. If you use AppRole or another method for the job, apply the same rule to its role. Because the policy is attached at login, changes to the role take effect on the next token issued, so plan to re-check the role after any change to the job's identity.

Verify the policy with a test token before the first scheduled run. Create a token that carries only this policy, then confirm it can request a snapshot to a local file. Next, confirm it is denied when it tries to read a sample path such as a KV secret, list sys/policies/acl, read sys/auth, or write to sys/mounts. A denial on each probe shows the policy is doing its job. Run these checks with the same auth flow the CronJob uses, not with a root token. Record the results, because a restore drill later depends on knowing which identity can take snapshots. Illustrative: if the snapshot succeeds but a secret read also succeeds, a second policy is attached to the role and the role definition needs correction.

Testing a restore so the backup is usable

A throwaway test cluster is where your team learns to restore before it has to. Run drills on a schedule and on every change to the snapshot agent, the S3 bucket or the OpenBao version, because a snapshot that was written successfully is not proof that it can be loaded. Use a cluster that has no connection to production identities, production auto-unseal keys or production DNS, so a mistake in the drill cannot reach live secrets.

  • Pick a snapshot from the bucket: Download the most recent object and one older object, so you test both the current pipeline and the retention that you will rely on later.
  • Restore into an isolated cluster: Start a fresh Raft cluster from the Helm chart with the same OpenBao version family as the source, then restore the snapshot into it using the restore procedure in the OpenBao documentation for your release.
  • Verify unseal and login: Confirm that the restored cluster unseals with the expected method, then log in with a known test identity and read a known test secret.
  • Compare known paths: Keep a list of key paths, policy names and auth roles that must exist after restore, and compare that list with the restored instance rather than relying on a count alone.
  • Record the elapsed time: Log how long each step took so you can plan the production runbook from measured numbers in your own environment, not from assumptions.

Close each drill by writing down the snapshot name, the OpenBao version, the time taken and any step that needed manual work, then confirm that the runbook still matches what you did.

Security risks in snapshot backups

A Raft snapshot holds the full state of the OpenBao cluster, so the backup path deserves the same controls as the cluster itself. The cards below cover the places where a snapshot job can weaken the security of the secrets it protects, from key material stored beside the data to jobs that fail without anyone noticing.

Keys stored beside snapshots

A snapshot is encrypted at rest, but it is only usable when the unseal or recovery material for that cluster is also available. If the same S3 bucket or the same CI variables hold both the snapshot and the unseal keys, the encryption adds little protection. Keep unseal and recovery material in a separate custody process from the snapshot bucket, and confirm in the chart values and the OpenBao high availability and storage docs which keys a restore needs.

OpenBao HA docs

Leaked S3 credentials

The snapshot agent authenticates to S3 with a key stored in a Kubernetes Secret. Anyone who can read that Secret, or any pod that mounts it, can copy every snapshot out of the bucket. Use a dedicated IAM principal that can only write to one prefix, restrict read access on the Secret with RBAC, and rotate the key on a fixed schedule. Confirm which credential fields the chart expects before you create the Secret.

Public bucket access

A snapshot bucket with a public policy, a public ACL or an overly broad cross-account grant exposes the entire Raft dataset. Check that block public access settings are enabled at the account and bucket level, that the bucket policy names only the snapshot writer and the restore role, and that server-side encryption is enforced for every write. Verify these settings after each infrastructure change, not only at setup.

Lifecycle and retention gaps

Without a lifecycle rule, snapshots accumulate indefinitely and old copies of secrets outlive their rotation. A rule that expires objects too early can leave no restorable point. Set retention to match your recovery point objective, make sure versioning or object lock behaves as your policy requires, and confirm how the chart names and rotates snapshot files so the rule targets the right objects.

Snapshot API as a privileged path

The sys/storage/raft/snapshot endpoint returns the entire cluster state, so a token that can read it can read every secret. Grant the snapshot policy only to the agent's identity, keep it out of general operator and application policies, and audit its use. Confirm the exact capabilities the chart's policy grants and whether your OpenBao version exposes any finer control over the endpoint.

Failed or stale jobs

A CronJob that fails silently leaves the cluster unprotected until someone needs a restore and finds no recent snapshot. Alert on failed job runs and on the age of the newest object in the bucket, and test that the alert fires. Ask your platform team which Kubernetes events and job metrics feed your monitoring, and confirm how the chart reports a failed snapshot run before you rely on it.

Running snapshots after go-live: monitoring, rotation and upgrades

A snapshot CronJob that fails quietly is the most common way a backup program lapses, so the first post-go-live task is alerting on two conditions: the Job itself failing, and no new snapshot object appearing in the bucket within the expected window. Alert on both, because a Job can report success while writing nothing useful, and a bucket that stops receiving objects can go unnoticed for a long time. Confirm which Job and CronJob status fields your monitoring stack already collects, and whether the bucket side can be checked with your object storage provider's own tooling. Also confirm which OpenBao telemetry metrics are documented for your release before building dashboards on them, rather than assuming a metric name from another product applies.

Rotating the S3 access keys should not require a change window if the sequence is planned. Create the new key pair, update the credentials Secret that the CronJob reads, and then trigger one manual Job from the CronJob template so you see a successful upload with the new credentials before anything else changes. Pods that are already running keep the values they started with, so confirm whether your chart mounts the credentials as environment variables or as files, and whether a new Job picks up the change without a rollout. Revoke the old key only after a successful run and a verified object in the bucket. Record the key's creation and retirement dates, since the Secret itself is not an audit trail.

Restore drills must be repeated after upgrades, not treated as a one-time test at go-live. Each OpenBao minor line and each chart release can change defaults, images and snapshot handling, so pin the chart version to the OpenBao release line you run and read the release notes for both before upgrading. The OpenBao releases page lists the current 2.7.x and 2.6.x patch releases, including 2.7.1 and 2.6.4, so check whether your chart's default image tag matches the line you intend to run. After each upgrade, restore the newest snapshot into a scratch cluster and confirm that the restored node unseals and reads a known secret. A snapshot that has not been restored since the last upgrade is unproven.

Questions teams ask before enabling Raft snapshots to S3

What does it cost to enable Raft snapshots to S3 and what drives the effort?

The cost is mostly the labor to configure and test the backup path, plus the storage you pay your cloud or storage provider for. Labor depends on how many OpenBao clusters you run, whether each has its own bucket and IAM identity, how your S3 storage is already governed, and how much time restore drills take. The one-time work is building the bucket, the least-privilege identity, the policy on sys/storage/raft/snapshot and the first restore test. The recurring work is retention management, credential rotation and periodic restore drills. Ask any partner for a written quote that lists each cluster, bucket, identity and restore test as separate line items.

Can our in-house platform team enable scheduled snapshots without outside help?

Yes, if your team already operates Kubernetes, manages OpenBao policies and can administer your S3 accounts. The chart setting itself is short, but the parts that take judgment are the minimal policy, a credential scoped to a single bucket path, encryption and retention on the bucket, and a restore procedure that someone has actually run. Teams without recent OpenBao admin experience usually find the restore test is where gaps appear. An outside partner can take on the design, the build and the first restore drill, then hand over a runbook your team can repeat.

What access do we need to give a partner for this work?

The partner needs a scoped path into each environment, not broad administrator rights. Typically that means S3 permissions to create or review a bucket and its lifecycle and encryption settings, rights in the Kubernetes namespace to create the CronJob and its secret, and an OpenBao administrative token or a policy-writing role for the snapshot policy and a test restore into a non-production cluster. Ask the partner to name each permission, the account that holds it and when it is removed after the engagement ends.

How long does it take to enable scheduled snapshots to S3?

Duration depends on the environment more than on the chart configuration itself. The factors that extend it are the number of clusters, whether buckets and IAM roles already exist, change approval rules in your organization, and whether a restore drill must run in a separate environment with its own approvals. Teams with existing S3 governance and a non-production OpenBao cluster can move faster. Ask for a timeline tied to named milestones in the written scope rather than a single duration.

Do Raft snapshots replace the Kubernetes etcd backups we already run?

No. OpenBao's Raft snapshots protect OpenBao's own data, which holds secrets, policies, auth configuration and PKI material. Kubernetes stores its cluster state in etcd, and the Kubernetes documentation asks administrators to run a separate etcd backup plan using etcdctl snapshot save and restore with etcdutl. Each backup covers a different system, so you need both, and each needs its own restore test. Confirm which system holds the data you would need to recover first.

Why does a snapshot that was never restored not count as a backup?

A snapshot proves that a file was written, not that OpenBao can read it back into a working cluster. Restore tests check the snapshot file, the encryption key and unseal material needed to bring the cluster back, the version compatibility between the snapshot and the target binary, and the time your team needs to complete the steps. Schedule restore drills into a separate test cluster at a fixed interval and record the results. Treat a failed drill as a backup incident.

What should we ask a partner to put in a written scope?

Ask for a scope that names each deliverable and its acceptance check. The list should cover the clusters in scope, the bucket and its encryption, retention and lifecycle settings, the IAM identity and its rotation method, the CronJob schedule and failure alerting, the minimal policy on sys/storage/raft/snapshot, one restore test into a non-production cluster with recorded results, and a runbook for your team. Also ask who holds each credential after handover, what is excluded, how changes are priced and how restore drills continue after the engagement.

Limits to confirm in your environment

A snapshot schedule is only as good as the environment it runs in. The items below cover the chart version, the S3 service, the restore path and the cluster topology, and each one can silently block a backup or make a restore fail.

Chart version and snapshot values

Confirm which chart version you are installing and that its snapshot agent settings match the keys in your version's values file. The snapshot CronJob, its schedule and its image tag can differ between chart releases, so a copied values block from another version may not render. Run every install and upgrade with --dry-run and inspect the rendered CronJob before applying it.

OpenBao HA docs

S3 endpoint compatibility

Confirm that your target is an S3 API endpoint the snapshot agent supports, whether that is AWS S3, a self-hosted object store or a vendor gateway. Check the path style or virtual-hosted addressing, region handling and signature version your store expects. A store that accepts uploads from a test tool may still reject the agent's requests, so test an upload with the exact credentials the CronJob will use.

Object lock and encryption options

Decide whether snapshots need write-once retention through object lock and whether the bucket must use server-side encryption with a key you manage. Confirm that your store supports these features for the bucket type you chose, and that the agent's credentials can write objects under the lock settings without needing delete rights. Retention rules on snapshot objects also control how old backups are removed.

Restore behavior across versions

Confirm which OpenBao version the snapshot was taken on and which version you would restore it to, and test that pairing before you need it. Raft snapshots are tied to the storage format of the cluster that produced them, and upgrades change the server. Record the snapshot version alongside each backup so a restore target can be chosen deliberately.

Migration guide

Network paths from the cluster to S3

Confirm the route from the pods that run the snapshot job to the object store, including egress rules, NAT, proxies, DNS resolution and any network policy applied to the namespace. Private or air-gapped object stores often need a specific endpoint and certificate trust chain. Check the path from the job's node pool, since nodes in different subnets may reach the store differently.

Snapshot agent and storage topology

Confirm that the snapshot agent can reach the active node and how it behaves when leadership moves or a pod is rescheduled. Check whether your cluster uses integrated Raft storage on StatefulSet pods, and whether the agent targets the active service or a specific pod. Test a snapshot after a leader change and after a pod restart, because a job that succeeds on a healthy cluster may fail during failover.

How DeployOpen scopes and supports OpenBao backup work

DeployOpen treats scheduled Raft snapshots to S3 as a backup system that must be proven by restore, not just by a successful job log. We scope the snapshot CronJob, its storage and credentials, and the restore test in writing, then build, document and hand over the result in the infrastructure you control.

How we scope

  • Written scope lists the snapshot schedule, retention expectations, S3 bucket and region, and who owns each.
  • We confirm which OpenBao chart version and Raft cluster layout the snapshot agent will run against.
  • The scope names the restore test, its target environment and the evidence the restore must produce.

How we build

  • We create the S3 credentials secret and a minimal policy limited to sys/storage/raft/snapshot access.
  • We configure the chart's snapshot agent CronJob values and run each install and upgrade with a dry run first.
  • We test a snapshot restore into a separate cluster and record the steps, timings and any gaps found.

How we hand over

  • You receive the chart values, policy definitions and CronJob manifests as version-controlled files.
  • Runbooks cover failed snapshot jobs, credential rotation, and the step-by-step restore procedure your team can repeat.
  • A handover session walks your platform and security staff through the restore test and its evidence.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, OpenBao upgrades and recurring restore testing are available as a retainer.
  • Before a retainer starts, confirm with us what response and review arrangements apply to your environment.

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.