Skip to content

Ops API: list_previous_configurations + restore_previous_configuration #665

Description

@kriszyp

Two new Ops API operations to surface and restore the configuration backup history:

list_previous_configurations (CORE-2883)

Return the list of configuration backups from ~/hdb/backup/, including their timestamps, so operators can identify which version to restore.

{ "operation": "list_previous_configurations" }

Response: array of { timestamp, path, description } (or similar).

restore_previous_configuration (CORE-2884)

Restore a previous configuration version by timestamp. Copies the designated file from ~/hdb/backup/ to ~/hdb/harperdb-config.yaml (optionally with replicated: true for cluster-wide restore).

{
  "operation": "restore_previous_configuration",
  "timestamp": "2025-09-16T12:34:56Z"
}

Acceptance criteria

  • list_previous_configurations returns a usable list of available backups with timestamps that can be passed directly to restore_previous_configuration.
  • restore_previous_configuration succeeds and triggers a config reload (restart if necessary).
  • Both operations are documented in the Ops API docs.
  • Error handling: clear messages for "no backup at that timestamp" / "backup file corrupt".

Jira fields: Feature Type: ESS Request · Business Impact: Operational efficiency (both suggested)

🤖 Filed by Claude on behalf of Kris.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:operations-apiOperations API: handlers, validation, response shapeenhancementNew feature or requestfrom-jiraMigrated or originated from a Jira ticket

    Type

    No type

    Fields

    Priority

    P1

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions