backups
Creates, updates, deletes, gets or lists a backups resource.
Overview
| Name | backups |
| Type | Resource |
| Id | google.firestore.backups |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The unique resource name of the Backup. Format is projects/{project}/locations/{location}/backups/{backup}. |
database | string | Output only. Name of the Firestore database that the backup is from. Format is projects/{project}/databases/{database}. |
databaseUid | string | Output only. The system-generated UUID4 for the Firestore database that the backup is from. |
expireTime | string (google-datetime) | Output only. The timestamp at which this backup expires. |
snapshotTime | string (google-datetime) | Output only. The backup contains an externally consistent copy of the database at this time. |
state | string | Output only. The current state of the backup. |
stats | object | Output 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) |
| Name | Datatype | Description |
|---|---|---|
backups | array | List of all backups for the project. |
unreachable | array | List of locations that existing backups were not able to be fetched from. Instead of failing the entire requests when a single location is unreachable, this response returns a partial result set and list of locations unable to be reached here. The request can be retried against a single location to get a concrete error. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, backupsId | Gets information about a backup. | |
list | select | projectsId, locationsId | filter | Lists all the backups. |
delete | delete | projectsId, locationsId, backupsId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
backupsId | string | |
locationsId | string | |
projectsId | string | |
filter | string |
SELECT examples
- get
- list
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
;
Lists all the backups.
SELECT
backups,
unreachable
FROM google.firestore.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
;
DELETE examples
- delete
Deletes a backup.
DELETE FROM google.firestore.backups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupsId = '{{ backupsId }}' --required
;