turbot/gcp

steampipe plugin install gcpsteampipe plugin install gcp
On This Page
Get Involved

Table: gcp_sql_backup

Backups help to restore lost data to Cloud SQL instance. Backups protect data from loss or damage.

Examples

Basic info

select
id,
instance_name,
description,
status,
end_time,
enqueued_time,
start_time,
window_start_time
from
gcp_sql_backup;

Count of backups by their type (i.e AUTOMATED and ON_DEMAND)

select
type,
count(*) as backup_count
from
gcp_sql_backup
group by
type;

Get the error message if the backup failed

select
id,
instance_name,
e ->> 'code' as error_code,
e ->> 'message' as error_message
from
gcp_sql_backup,
jsonb_array_elements(error) as e
where
status = 'FAILED';

.inspect gcp_sql_backup

GCP SQL Backup

NameTypeDescription
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
descriptiontextA user-specified, human-readable description of the backup run.
disk_encryption_configurationjsonbSpecifies the encryption configuration for the disk.
disk_encryption_statusjsonbSpecifies the encryption status of the disk.
end_timetimestamp without time zoneSpecifies the time when the backup operation completed.
enqueued_timetimestamp without time zoneSpecifies the time when the run was enqueued.
errorjsonbInformation about why the backup operation failed. This is only present if the run has the FAILED status.
idbigintAn unique identifier for the backup run.
instance_nametextThe name of the Cloud SQL instance.
kindtextThe type of the resource.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
projecttextThe GCP Project in which the resource is located.
self_linktextThe server-defined URL for the resource.
start_timetimestamp without time zoneSpecifies the time when the backup operation actually started.
statustextSpecifies the status of the backup run.
titlebigintTitle of the resource.
typetextSpecifies the type of the backup run. Value can be either 'AUTOMATED' or 'ON_DEMAND'.
window_start_timetimestamp without time zoneSpecifies the start time of the backup window during which this the backup was attempted.