Method: instances.restoreBackup Stay organized with collections Save and categorize content based on your preferences.
- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- InstancesRestoreBackupRequest
- RestoreBackupContext
- Examples
- Try it!
Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
HTTP request
POST https://sqladmin.googleapis.com/v1/projects/{project}/instances/{instance}/restoreBackup
The URL usesgRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Project ID of the project that contains the instance. |
instance |
Cloud SQL instance ID. This does not include the project ID. |
Request body
The request body contains an instance ofInstancesRestoreBackupRequest
.
Response body
If successful, the response body contains an instance ofOperation
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/sqlservice.admin
For more information, see theAuthentication Overview.
InstancesRestoreBackupRequest
Database instance restore backup request.
JSON representation |
---|
{"restoreBackupContext":{object ( |
Fields | |
---|---|
restore |
Parameters required to perform the restore backup operation. |
backup |
The name of the backup that's used to restore a Cloud SQL instance: Format: projects/{project-id}/backups/{backup-uid}. Only one of restoreBackupContext, backup, backupdrBackup can be passed to the input. |
restore |
Optional. By using this parameter, Cloud SQL overrides any instance settings stored in the backup you are restoring from. You can't change the instance's major database version and you can only increase the disk size. You can use this field to restore new instances only. This field is not applicable for restore to existing instances. |
RestoreBackupContext
Database instance restore from backup context. Backup context contains source instance id and project id.
JSON representation |
---|
{"kind":string,"backupRunId":string,"instanceId":string,"project":string} |
Fields | |
---|---|
kind |
This is always |
backup |
The ID of the backup run to restore from. |
instance |
The ID of the instance that the backup was taken from. |
project |
The full project ID of the source instance. |
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-05-30 UTC.