Skip to content

backups: encrypt copies at rest and let doctor inspect the copy directory #99

Closed

Description

@TusanHomichi

Existing issue check

  • I searched open and closed issues for this work.

Problem or outcome

Off-server backup copies (#90, ADR 0024) are plain SQLite files. Protecting the share is left to the agency "until an encryption decision exists". doctor does not look at the copy directory, so backup health is visible only while the server runs. Both are recorded as consequences in ADR 0024.

Scope

In scope:

  • An ADR deciding whether copies are encrypted at rest, and how. It covers key custody, how a key is recovered when the server is lost, and how restore reads an encrypted copy.
  • Implement that decision.
  • doctor reports the copy directory's state, read-only, with the same states as /api/backups/status.

Out of scope:

  • Encrypting the live database.

Acceptance criteria

  • doctor reports not_configured, unreachable, behind, or current without writing anything (ADR 0003). Tests cover each state.
  • The encryption ADR is accepted, and if encryption is adopted, a restore from an encrypted copy is tested.

Expected proof

  • cargo test --workspace, including doctor tests for each state.

Execution record

Related roadmap, decisions, or issues

Activity

  1. added a commit that references this issue on Oct 15, 2026
    e8f4e42
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions