Skip to content

[M5.4] Instance backup #231

Closed
Closed

Description

@samuelmbabhazi

Task id

M5.4

Track

C: control plane

Scope

  • Control plane DB, CA, KEK to a separate target; documented disaster recovery procedure tested.

Acceptance criteria

A fresh control plane restored from backup re-adopts existing agents.

Depends on

M5.2

Activity

  1. added this to the M5 Data milestone on Nov 7, 2026
  2. added
    v0.1-stable
    priority:P1
    and removed
    priority:P2
    on Nov 21, 2026
  3. samuelmbabhazi commented on Nov 23, 2026

    @samuelmbabhazi
    CollaboratorAuthor

    Done in #427 (encrypted export and restore, ADR 0026) and #428 (S3 destination).

    Acceptance: a fresh control plane restored from backup re-adopts the existing agents. Met on the lab, which has a control plane and a real server whose agent runs hello through its Caddy:

    1. A secret GREETING is set, and hello uses it. Then ./backup.sh keygen and ./backup.sh create (local), and create --s3.
    2. docker compose down -v removes every volume (database, key, Caddy, metrics), and up -d gives a fresh installation: a new key, an empty database, sign-in refused.
    3. ./backup.sh restore … --replace-this-installation, in 11 s:
      • the key-encryption key is the one from before (same SHA-256);
      • the agent reconnected on its own, with the identity it already had;
      • sign-in, the 4 applications and GREETING are back;
      • a new deployment of hello succeeded, its container holds GREETING=restored-from-backup, and it answers 200 over HTTPS.
    4. The same restore from S3 (restore s3:NAME) succeeded.

    The procedure is documented in INSTALL.md ("Back up and restore") and ADR 0026: what a failure at each step leaves, what a restore brings back to the backup's time, and what to do after a compromise.

    Also checked during the reviews:

    • An archive forged with only the public key is refused before pg_restore gets a byte.
    • A restore ends every session.
    • An interrupted keygen leaves no identity behind.
    • An S3 upload never replaces or deletes another run's archive.

    Follow-ups: #429 (half-open PostgreSQL sessions after up -d) and #439 (refuse an archive restored under another name). The disaster recovery run on a real server is part of the VM acceptance (#200).

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

    priority:P1security-reviewtasktrack:control-planev0.1-stable

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions