projects

Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database long-running operation has a name of the format projects//instances//databases//operations/, and can be used to track the progress of the operation, and to cancel it. The metadata field type is RestoreDatabaseMetadata. The response type is Database, if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.

post/v1/{+parent}/databases:restore

Request

  • Base URL: https://spanner.googleapis.com
  • URL: https://spanner.googleapis.com/v1/{+parent}/databases:restore
  • Auth: one of:
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/cloud-platform) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/cloud-platform)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/spanner.admin) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/spanner.admin)

Path parameters

parentstring required

Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form projects//instances/.

Request body

backupstring

Name of the backup from which to restore. Values are of the form projects//instances//backups/.

databaseIdstring

Required. The id of the database to create and restore to. This database must not already exist. The database_id appended to parent forms the full database name of the form projects//instances//databases/.

Response

Successful response

Changes

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/spanner.admin was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/spanner.admin was removed from the endpoint's security scheme Oauth2c

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/spanner.admin was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/spanner.admin was removed from the endpoint's security scheme Oauth2c