Skip to content

Back Up and Retain Data

Repository scripts support Compose only. Kubernetes/external stores require operator tooling.

backup.sh writes Postgres globals/database dumps, Redis AOF after rewrite, and available STS/Gateway replay state. It excludes secrets.

Terminal window
CARACAL_BACKUP_DIR=/var/backups/caracal CARACAL_BACKUP_RETAIN=7 bash infra/scripts/backup.sh

Set the Compose project when non-default. Encrypt/copy off-host and back up matching secrets separately.

Inspect manifest/dumps/AOF/replay, then restore with copied secrets into an isolated project and verify readiness, policy, sessions, revocation, authorization, and audit.

Terminal window
CARACAL_COMPOSE_PROJECT=<isolated-project> CARACAL_RESTORE_CONFIRM=yes bash infra/scripts/restore.sh <bundle.tar.gz>

Postgres/Redis containers and matching secrets must exist.

On failure keep isolated, preserve output/state, recreate clean volumes, and retry from original bundle/secrets. Never reopen partial restore.

Use Respond to Incidents after data loss or tampering.