Skip to content

[CLOUDGA-26754] Describe GCP Backup Replication - #317

Merged
pranbansal02 merged 1 commit into
mainfrom
pranav/CLOUDGA-26754
Nov 26, 2025
Merged

[CLOUDGA-26754] Describe GCP Backup Replication#317
pranbansal02 merged 1 commit into
mainfrom
pranav/CLOUDGA-26754

Conversation

@pranbansal02

@pranbansal02 pranbansal02 commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

Overview

This PR adds CLI commands for managing GCP backup replication configuration. The implementation follows a cloud-first, action-second structure to support multiple cloud providers (GCP, AWS, Azure) in the future.

  • Added Unit tests for the describe command
  • Added documentation for all commands

Feature Flag: Command is gated behind YBM_FF_BACKUP_REPLICATION_GCP_TARGET feature flag

Commands Added

Command Structure

ybm cluster backup-replication
  └── gcp
      ├── describe
      ├── enable (later)
      ├── disable (later)
      ├── update (later)
      └── sync (later)

1. Parent Command: backup-replication

Command: ybm cluster backup-replication

Help Output:

Manage backup replication configuration for a cluster. Supports multiple cloud providers (GCP, AWS, Azure).

Usage:
  ybm cluster backup-replication [flags]
  ybm cluster backup-replication [command]

Available Commands:
  gcp         Manage GCP backup replication configuration

Flags:
  -h, --help   help for backup-replication

2. Cloud Subcommand: gcp

Command: ybm cluster backup-replication gcp

Help Output:

Manage GCP backup replication configuration for a cluster

Usage:
  ybm cluster backup-replication gcp [flags]
  ybm cluster backup-replication gcp [command]

Available Commands:
  describe    Describe the current GCP backup replication configuration

Flags:
  -c, --cluster-name string   [REQUIRED] The name of the cluster.
  -h, --help                  help for gcp

3. Action Command: describe

Command: ybm cluster backup-replication gcp describe

Help Output:

Describe the current GCP backup replication configuration for the specified cluster

Usage:
  ybm cluster backup-replication gcp describe [flags]

Flags:
  -h, --help       help for describe
      --show-all   Show all configurations including scheduled for expiry and removed regions

Table Output

  • Default view
$ ./ybm cluster backup-replication gcp describe --cluster-name gp-vpc
Overall State: ENABLED

Region     Config State   Bucket Name              Latest Operation Status   Last Run           Next Run
us-west1   ENABLED        backup-bucket-us-west1   SUCCESS                   2024-01-15,09:30   2024-01-15,10:00
us-east1   ENABLED        backup-bucket-us-east1   IN_PROGRESS               N/A                2024-01-15,11:00
  • Show all view
image

Columns:

  • Region: Cluster region GCP code (from spec.regional_targets)
  • Config State: State of the backup replication config (ENABLED/DISABLED)
  • Bucket Name: Target GCS bucket name (from spec.regional_targets[].target)
  • Latest Operation Status: Status of the latest transfer operation (SUCCESS/IN_PROGRESS/FAILED/N/A)
  • Last Run: End time of the last transfer operation (formatted as "YYYY-MM-DD,HH:MM" in local timezone, or "N/A")
  • Next Run: Next scheduled transfer operation time (formatted as "YYYY-MM-DD,HH:MM" in local timezone, or "N/A")
  • Expiry Time: Scheduled expiry time of the replication config (formatted as "YYYY-MM-DD,HH:MM" in local timezone, or "N/A") [Only Present for Configurations Set for Expiry]

@pranbansal02
pranbansal02 requested a review from a team as a code owner November 18, 2025 09:38
Comment thread cmd/cluster/backup-replication/backup_replication.go Outdated
Comment thread cmd/cluster/backup-replication/gcp/gcp.go Outdated
Comment thread cmd/cluster/backup-replication/gcp/describe_gcp.go
Comment thread cmd/cluster/backup-replication/gcp/describe_gcp.go Outdated

@posriniv posriniv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@pranbansal02
pranbansal02 merged commit a225226 into main Nov 26, 2025
1 check passed
@pranbansal02
pranbansal02 deleted the pranav/CLOUDGA-26754 branch November 26, 2025 02:53
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