Method: projects.instances.backups.create Stay organized with collections Save and categorize content based on your preferences.
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the formatprojects/<project>/instances/<instance>/backups/<backup>/operations/<operationId> and can be used to track creation of the backup. The metadata field type isCreateBackupMetadata. The response field type isBackup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.
HTTP request
POST https://spanner.googleapis.com/v1/{parent=projects/*/instances/*}/backupsThe URLs usegRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The name of the instance in which the backup is created. This must be the same instance that contains the database the backup is created from. The backup will be stored in the locations specified in the instance configuration of this instance. Values are of the form Authorization requires the followingIAM permission on the specified resource
|
Query parameters
| Parameters | |
|---|---|
backupId |
Required. The id of the backup to be created. The |
encryptionConfig |
Optional. The encryption configuration used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the database by default, namely |
Request body
The request body contains an instance ofBackup.
Response body
If successful, the response body contains a newly created instance ofOperation.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/spanner.adminhttps://www.googleapis.com/auth/cloud-platform
For more information, see theAuthentication Overview.
IAM Permissions
Requires the followingIAM permission on thedatabase resource:
spanner.databases.createBackup
Requires the followingIAM permission on theparent resource:
spanner.backups.create
For more information, see theIAM documentation.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-12 UTC.