Skip to main content

Recovery drill: Key Value

Seed a paid Key Value RDB into a new Valkey instance in a restore-* namespace and verify a key after AOF rewrite.

Share
Last updated on September 23, 2026
On this page

Use scripts/restore-keyvalue.sh (see Platform recovery rehearsals). The script has no in-place mode: it always creates a new restore-* namespace and empty PVC, loads a checksum-validated RDB once with AOF disabled, rewrites AOF, and verifies after rollout.

Prepare

  • Paid Key Value instance id (--id red-…).
  • A decryptable RDB object (--snapshot latest or explicit s3://…).
  • A --verify-key (and optional --expect) known to exist in that snapshot.

DRY_RUN

bash
cd /path/to/bex
DRY_RUN=1 scripts/restore-keyvalue.sh \
  --id red-EXAMPLE \
  --target-namespace restore-kv-drill \
  --verify-key myapp:ready \
  --snapshot latest

Restore

bash
scripts/restore-keyvalue.sh \
  --id red-EXAMPLE \
  --target-namespace restore-kv-drill \
  --verify-key myapp:ready \
  --expect 1 \
  --snapshot latest \
  --confirm restore-kv-drill \
  --teardown-on-success

Throwaway passwords are generated for the drill and never printed on argv.

Verify and clean up

Confirm the verify-key expectation passed. Tear down with --teardown restore-kv-drill --confirm restore-kv-drill if needed.

Was this page helpful?

Run this on infrastructure you own

bex is the open-source, AI-native Render alternative — push a git repo and get a running HTTPS service on your own machines.

Get started with bex