Skip to main content

backups

Creates, updates, deletes, gets or lists a backups resource.

Overview

Namebackups
TypeResource
Idgoogle.redis.backups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Full resource path of the backup. the last part of the name is the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster UID] OR customer specified while backup cluster. Example: 20240515123000_1234
backupFilesarrayOutput only. List of backup files of the backup.
backupTypestringOutput only. Type of the backup. (BACKUP_TYPE_UNSPECIFIED, ON_DEMAND, AUTOMATED)
clusterstringOutput only. Cluster resource path of this backup.
clusterUidstringOutput only. Cluster uid of this backup.
createTimestring (google-datetime)Output only. The time when the backup was created.
encryptionInfoobjectOutput only. Encryption information of the backup. (id: EncryptionInfo)
engineVersionstringOutput only. redis-7.2, valkey-7.5
expireTimestring (google-datetime)Output only. The time when the backup will expire.
nodeTypestringOutput only. Node type of the cluster. (NODE_TYPE_UNSPECIFIED, REDIS_SHARED_CORE_NANO, REDIS_HIGHMEM_MEDIUM, REDIS_HIGHMEM_XLARGE, REDIS_STANDARD_SMALL, REDIS_HIGHCPU_MEDIUM, REDIS_STANDARD_LARGE, REDIS_HIGHMEM_2XLARGE)
replicaCountinteger (int32)Output only. Number of replicas for the cluster.
shardCountinteger (int32)Output only. Number of shards for the cluster.
statestringOutput only. State of the backup. (STATE_UNSPECIFIED, CREATING, ACTIVE, DELETING, SUSPENDED)
totalSizeBytesstring (int64)Output only. Total size of the backup in bytes.
uidstringOutput only. System assigned unique identifier of the backup.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, backupCollectionsId, backupsIdGets the details of a specific backup.
listselectprojectsId, locationsId, backupCollectionsIdpageSize, pageTokenLists all backups owned by a backup collection.
deletedeleteprojectsId, locationsId, backupCollectionsId, backupsIdrequestIdDeletes a specific backup.
exportexecprojectsId, locationsId, backupCollectionsId, backupsIdExports a specific backup to a customer target Cloud Storage URI.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
backupCollectionsIdstring
backupsIdstring
locationsIdstring
projectsIdstring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples

Gets the details of a specific backup.

SELECT
name,
backupFiles,
backupType,
cluster,
clusterUid,
createTime,
encryptionInfo,
engineVersion,
expireTime,
nodeType,
replicaCount,
shardCount,
state,
totalSizeBytes,
uid
FROM google.redis.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupCollectionsId = '{{ backupCollectionsId }}' -- required
AND backupsId = '{{ backupsId }}' -- required
;

DELETE examples

Deletes a specific backup.

DELETE FROM google.redis.backups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupCollectionsId = '{{ backupCollectionsId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND requestId = '{{ requestId }}'
;

Lifecycle Methods

Exports a specific backup to a customer target Cloud Storage URI.

EXEC google.redis.backups.export
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@backupCollectionsId='{{ backupCollectionsId }}' --required,
@backupsId='{{ backupsId }}' --required
@@json=
'{
"gcsBucket": "{{ gcsBucket }}"
}'
;