Skip to content

feat(infra): olf infra backup for the local provider (#531) #910

Closed

Description

@malon64

Part of #531. Decisions are in #531's comments.

Scope

olf infra backup --output DIR. The provider comes from the profile; local only for now.

  1. Plan from the applied provider contract:

    • the databases: dagster_<stage>, superset_<stage> per analytics stage, openmetadata_db with governance, dex with Dex, and polaris (environments/local/main.tf:111-148);
    • the buckets: lakehouse-<stage>-{bronze,silver,gold} plus openlakeforge-ops;
    • the data-bound Secrets plus local-ca: openmetadata-fernet-key, superset-credentials per stage, polaris-bootstrap-credentials, the Polaris principal Secrets, the OpenMetadata admin/bot Secrets, the GitHub OAuth Secret, and local-ca.
  2. Pause the Dagster daemon in each stage, and refuse if runs are in flight (DagsterClient). Resume it in a finally.

  3. Dump polaris first, then the other databases (pg_dump -Fc --no-owner --no-acl, streamed from postgresql-0 via kubectl exec).

  4. Copy the objects through infra/s3.port_forward_client, and write a key + size inventory.

  5. Encrypt the Secrets bundle with a passphrase envelope using cryptography. The passphrase comes from a prompt or an environment variable, never from argv.

  6. Write manifest.json:

    • release, profile sha256, provider and stages;
    • databases, with each file's sha256 and size;
    • buckets;
    • Secret names only.

    Also write SHA256SUMS.

Tests that must fail first

  • A Full DEV+PROD contract fixture plans exactly the seven databases and 6+1 buckets.
  • The polaris dump precedes the first object copy.
  • The daemon is resumed when a step fails.
  • No plaintext Secret value appears in DIR or in the log (find_exposures).

Split

If this exceeds 15 files / 600 lines, split it: (a) the plan, manifest and encrypted Secrets bundle; (b) the data copy.

Activity

  1. added
    track: operability
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    track: operability

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions