Skip to content

Improve legacy CloudVPS backup state and reconciliation #38

Description

@adinvadim

Context

The documented CloudVPS v1 backup switch is already exposed as:

regru vps backup enable <server-id>
regru vps backup disable <server-id>
regru vps backup restore <server-id> <backup-image-id>

GET /v1/reglets/{server-id} exposes backups_enabled and nullable
last_backup_date. The current CLI preserves those fields in JSON, but it has
no focused status command, normal human/plain vps get output does not show
them, and enable/disable reports only the provider action rather than the
verified postcondition.

Provider sources:

Scope

  • Add regru vps backup status <server-id>.
  • Return the normalized enabled state and nullable last-backup date in human,
    plain, and JSON output.
  • Surface the same state in vps get without breaking the stable plain-output
    contract; if extending plain output would be breaking, document and retain
    backup status as the stable machine-readable path.
  • After an accepted enable/disable action reaches a terminal success state,
    read the server once and verify that backups_enabled matches the requested
    state. Never replay an ambiguously delivered mutation automatically.
  • Preserve support for provider boolean variants (true/false, 0/1, and
    the documented legacy string forms).
  • Make disable confirmation explain that REG.RU currently retains copies from
    the non-configurable backup for only three calendar days. Do not hard-code a
    price.
  • Add command, provider, reconciliation, output, and contract-drift tests.
  • Update docs/cloudvps.md, docs/cli-contract.md, and the changelog.

Acceptance criteria

  • backup status works without sending a mutation and has stable JSON/plain
    output.
  • Successful enable/disable waits are followed by a verified provider state.
  • A mismatched or undecodable postcondition fails closed instead of reporting
    success.
  • --dry-run, confirmation, --force, --no-input, --no-wait, timeout,
    and outcome_unknown behavior remain consistent with the existing CLI
    contract.
  • make check passes.

Boundary

This ticket covers only the published, non-configurable CloudVPS backup
switch. It must not model the newer named backup service with configurable
schedule and retention policies.

Activity

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

    enhancementNew feature or requestready-for-agentFully specified and ready for an agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions