backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | google.sqladmin.backups |
Fields
The following fields are returned by SELECT
queries:
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
create_backup | exec | projectsId | Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand backups. | |
list_backups | exec | projectsId | pageSize , pageToken , filter | Lists all backups associated with the project. |
get_backup | exec | projectsId , backupsId | Retrieves a resource containing information about a backup. | |
update_backup | exec | projectsId , backupsId | updateMask | Updates the retention period and description of the backup. You can use this API to update final backups only. |
delete_backup | exec | projectsId , backupsId | Deletes the 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 | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
Lifecycle Methods
- create_backup
- list_backups
- get_backup
- update_backup
- delete_backup
Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand backups.
EXEC google.sqladmin.backups.create_backup
@projectsId='{{ projectsId }}' --required
@@json=
'{
"description": "{{ description }}",
"instance": "{{ instance }}",
"location": "{{ location }}",
"ttlDays": "{{ ttlDays }}",
"expiryTime": "{{ expiryTime }}"
}';
Lists all backups associated with the project.
EXEC google.sqladmin.backups.list_backups
@projectsId='{{ projectsId }}' --required,
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}',
@filter='{{ filter }}';
Retrieves a resource containing information about a backup.
EXEC google.sqladmin.backups.get_backup
@projectsId='{{ projectsId }}' --required,
@backupsId='{{ backupsId }}' --required;
Updates the retention period and description of the backup. You can use this API to update final backups only.
EXEC google.sqladmin.backups.update_backup
@projectsId='{{ projectsId }}' --required,
@backupsId='{{ backupsId }}' --required,
@updateMask='{{ updateMask }}'
@@json=
'{
"description": "{{ description }}",
"instance": "{{ instance }}",
"location": "{{ location }}",
"ttlDays": "{{ ttlDays }}",
"expiryTime": "{{ expiryTime }}"
}';
Deletes the backup.
EXEC google.sqladmin.backups.delete_backup
@projectsId='{{ projectsId }}' --required,
@backupsId='{{ backupsId }}' --required;