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:

Successful response

NameDatatypeDescription
namestringOutput only. The unique resource name of the Backup. Format is projects/{project}/locations/{location}/backups/{backup}.
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.
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;