Performing Instance Restore
In case a disaster strikes, you can restore an entire Cloud SQL instance from a cloud-native snapshot or image-level backup. Veeam Backup for Google Cloud allows you to restore one or more Cloud SQL instances at a time, to the original location or to a new location.
Veeam Backup for Google Cloud does not support restore to the original location if the source Cloud SQL instance is still present in the location or if its name is reserved. However, note that if you delete an instance from Google Cloud, all its cloud-native snapshots will be deleted as well due to technical limitations in Google Cloud.
How SQL Restore Works
To restore a Cloud SQL instance from a cloud-native snapshot, Veeam Backup for Google Cloud first creates a Cloud SQL instance in the target location and then uses native Google Cloud capabilities to revert the instance to the snapshot. Restore of Cloud SQL instances from cloud-native snapshots is supported only to a new location or with different settings.
To restore a Cloud SQL instance from an image-level backup, Veeam Backup for Google Cloud performs the following steps:
- Creates a Cloud SQL instance in the target location (that is, the project and region specified for the restore operation).
- Deploys a worker instance within the worker project in the Google Cloud region in which the repository with backed-up data is located (for MySQL instances), or in the target Google Cloud region in which the restored Cloud SQL instance will reside (for PostgreSQL instances).
For more information on how to specify a project for worker instances, see Managing Worker Configurations.
- [Applies only to MySQL instances] Uses the worker instance to export database files, triggers, stored procedures and users of the processed the Cloud SQL instance to a SQL dump file in the Temp subdirectory of the storage bucket where the backup repository resides.
For more information on SQL dump files, see Google Cloud documentation.
- [Applies only to MySQL instances] Uses native Google Cloud capabilities to import the exported data to the created Cloud SQL instance.
- [Applies only to PostgreSQL instances] Uses the worker instance to retrieve database files, triggers, stored procedures and users of the processed Cloud SQL instance from the backup file, and then imports this data to the created Cloud SQL instance.
- Removes the worker instance from Google Cloud.
- [Applies only to MySQL instances] Removes the SQL dump file from the Temp subdirectory of the storage bucket.
How to Perform SQL Restore
To restore a protected Cloud SQL instance, do the following:
- Launch the Cloud SQL Instance Restore wizard.
- Select a restore point.
- Choose a restore mode.
- Select a service account.
- Select a project.
- Select a region and an availability zone.
- Specify a new name and machine type for the instance.
- Configure network settings.
- Configure security settings.
- Enable flag assignment.
- Run configuration and permission checks.
- Specify a restore reason.
- Finish working with the wizard.
Before you start Cloud SQL instance restore, make sure that network settings are configured for each region where worker instances will be deployed during the restore process. For information on how to configure network settings, see Adding Worker Configurations.