Back to Genai Toolbox

cloud-sql-restore-backup

docs/en/integrations/cloud-sql-admin/tools/cloudsqlrestorebackup.md

1.1.02.3 KB
Original Source

About

The cloud-sql-restore-backup tool restores a backup on a Cloud SQL instance using the Cloud SQL Admin API.

Compatible Sources

{{< compatible-sources >}}

Parameters

parametertyperequireddescription
target_projectstringtrueThe project ID of the instance to restore the backup onto.
target_instancestringtrueThe instance to restore the backup onto. Does not include the project ID.
backup_idstringtrueThe identifier of the backup being restored.
source_projectstringfalse(Optional) The project ID of the instance that the backup belongs to.
source_instancestringfalse(Optional) Cloud SQL instance ID of the instance that the backup belongs to.

Example

Basic backup restore

yaml
kind: tool
name: backup-restore-basic
type: cloud-sql-restore-backup
source: cloud-sql-admin-source
description: "Restores a backup onto the given Cloud SQL instance."

Reference

fieldtyperequireddescription
typestringtrueMust be "cloud-sql-restore-backup".
sourcestringtrueThe name of the cloud-sql-admin source to use.
descriptionstringfalseA description of the tool.

Advanced Usage

  • The backup_id field can be a BackupRun ID (which will be an int64), backup name, or BackupDR backup name.
  • If the backup_id field contains a BackupRun ID (i.e. an int64), the optional fields source_project and source_instance must also be provided.

Additional Resources