Skip to content

[HorizonDB] Add restore command#10049

Draft
alxhghs wants to merge 4 commits into
Azure:mainfrom
alxhghs:alxhghs/alexfen-horizondb-restore-operations
Draft

[HorizonDB] Add restore command#10049
alxhghs wants to merge 4 commits into
Azure:mainfrom
alxhghs:alxhghs/alexfen-horizondb-restore-operations

Conversation

@alxhghs

@alxhghs alxhghs commented Jun 29, 2026

Copy link
Copy Markdown
Member

Description

Adds az horizondb restore to create a new HorizonDB cluster as a point-in-time restore of an existing source cluster.

  • restore — restore a HorizonDB cluster from a source cluster. Accepts --source-cluster and an optional --restore-time (RFC3339). When --restore-time is omitted it defaults to the current UTC time. The command sends createMode=PointInTimeRestore with the required PointInTimeUTC.

Mirrors the az postgres flexible-server restore convention (--restore-time, optional, default = now, parsed/validated with dateutil).

Note: the service currently requires the restore point to be at least ~5 minutes in the past (a temporary preview buffer), so supply an explicit older --restore-time if a restore very close to "now" is rejected.

Bumps the extension version to 1.0.0b3 and documents the change in HISTORY.rst / README.md.

Testing

  • azdev style horizondb — PASSED
  • azdev linter horizondb — PASSED
  • HorizonDBClusterMgmtScenarioTest recorded live (create → show → list → update → restore → delete) and verified in playback — PASSED

History Notes

  • Add support for restoring HorizonDB clusters through az horizondb restore.

Alex Fenwood Hughes and others added 3 commits June 26, 2026 14:16
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The `az horizondb restore` command sent createMode=PointInTimeRestore and
sourceClusterResourceId but omitted pointInTimeUTC, which the service requires
(MissingRequiredParameter). Add a `--restore-time` argument (optional, defaults
to current UTC time, parse-validated) mirroring `az postgres flexible-server
restore`, and pass it as point_in_time_utc.

- _params.py: add --restore-time arg with current-time default.
- custom_commands.py: parse --restore-time and set point_in_time_utc.
- _help.py: add point-in-time restore example.
- test: supply a valid restore time (utcnow - 6 min, clearing the 300s preview
  buffer) and assert createMode; re-record live cassette and commit test log.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-client-tools-bot-prd

Copy link
Copy Markdown
Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan yonzhan requested a review from Pan-Qi June 29, 2026 23:06
@yonzhan yonzhan requested a review from jsntcy June 29, 2026 23:06
@yonzhan

yonzhan commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

HorizonDB

…izondb-restore-operations

# Conflicts:
#	src/horizondb/HISTORY.rst
#	src/horizondb/azext_horizondb/_params.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants