HarperFast / HarperFast/harper
Ops API: list_previous_configurations + restore_previous_configuration
- Dominant language
- JavaScript
- Stars
- 89
- Forks
- 10
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 200
Description
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.
```json
{ "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).
```json
{
"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.
Contributor guide
Assessment
This issue has not been assessed yet.