gcloud-sql-backups-describe
Describe a Cloud SQL backup
TLDR
Retrieve information about a backup
SYNOPSIS
gcloud sql backups describe BACKUP --instance=INSTANCE [--project=PROJECT_ID] [--format=FORMAT] [GLOBAL-FLAGS]
PARAMETERS
BACKUP
ID of the Cloud SQL backup to describe (positional argument).
--instance (-i)
Name of the Cloud SQL instance the backup belongs to (required).
--project (-p)
ID of the Google Cloud project (defaults to current project).
--format
Output format: table, json, yaml, csv, value, or custom (default: table).
--help (-h)
Show help for the command.
--verbosity
Logging verbosity: debug, info, warning, error, critical, none.
DESCRIPTION
The gcloud sql backups describe command retrieves and displays detailed information about a specific backup of a Cloud SQL instance.
It shows metadata such as the backup's ID, creation timestamp, status (e.g., SUCCESSFUL, FAILED), size in bytes, type (automated or on-demand), and the associated instance details.
This is useful for verifying backup integrity before restoration, monitoring backup history, or troubleshooting issues like failed backups.
The command requires the backup ID and the instance name it belongs to. Output is in YAML, JSON, or table format by default, customizable via --format.
Permissions needed include cloudsql.backups.get. Backups are retained based on instance settings, typically 7 days for automated ones.
Example usage: gcloud sql backups describe backup-id --instance=my-instance lists properties like startTime, status, and windowStartTime.
CAVEATS
Backup must exist and user needs cloudsql.backups.get permission. Not available for Second Generation instances in some regions; use gcloud alpha/beta if needed. Output may truncate long fields.
EXAMPLES
gcloud sql backups describe latest-backup --instance=prod-db --format=yaml
Retrieves YAML details of the latest backup.
OUTPUT FIELDS
Key fields: kind, name, status, startTime, endTime, sizeBytes, type.
HISTORY
Introduced with gcloud SQL commands around 2014; evolved with Cloud SQL v2 support in 2016 and First/Second Gen instance types. Flags stabilized post-2018 GA.
SEE ALSO
gcloud sql backups list(1), gcloud sql backups restore(1), gcloud sql instances describe(1)


