Skip to main content

backups

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

Overview

Namebackups
TypeResource
Idgoogle.firestore.backups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. The unique resource name of the Backup. Format is projects/{project}/locations/{location}/backups/{backup}. The location in the name will be the Standard Managed Multi-Region (SMMR) location (e.g. us) if the backup was created with an SMMR location, or the Google Managed Multi-Region (GMMR) location (e.g. nam5) if the backup was created with a GMMR location.
databasestringOutput only. Name of the Firestore database that the backup is from. Format is projects/{project}/databases/{database}.
databaseUidstringOutput only. The system-generated UUID4 for the Firestore database that the backup is from.
expireTimestring (google-datetime)Output only. The timestamp at which this backup expires.
snapshotTimestring (google-datetime)Output only. The backup contains an externally consistent copy of the database at this time.
statestringOutput only. The current state of the backup. (STATE_UNSPECIFIED, CREATING, READY, NOT_AVAILABLE)
statsobjectOutput only. Statistics about the backup. This data only becomes available after the backup is fully materialized to secondary storage. This field will be empty till then. (id: GoogleFirestoreAdminV1Stats)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, backupsIdGets information about a backup.
listselectprojectsId, locationsIdfilterLists all the backups.
deletedeleteprojectsId, locationsId, backupsIdDeletes a backup.

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
backupsIdstring
locationsIdstring
projectsIdstring
filterstring

SELECT examples

Gets information about a backup.

SELECT
name,
database,
databaseUid,
expireTime,
snapshotTime,
state,
stats
FROM google.firestore.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupsId = '{{ backupsId }}' -- required
;

DELETE examples

Deletes a backup.

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