This is an archive version of the document. To get the most up-to-date information, see the current version.

Performing Database Restore

In case a disaster strikes, you can restore corrupted databases of a Cloud SQL instance from an image-level backup. Veeam Backup for Google Cloud allows you to restore databases to the original location or to a new location.

Note

Due to technical limitations in Google Cloud, Veeam Backup for Google Cloud does not support restore to the original location if the source database is still present in the location.

How Database Restore Works

To restore a Cloud SQL database from an image-level backup, Veeam Backup for Google Cloud performs the following steps:

  1. Creates a temporary snapshot of the Cloud SQL instance that will host the restored database.

Note

If Veeam Backup for Google Cloud fails to restore the database, the Cloud SQL instance will be reverted to the temporary snapshot. Consider that if the target instance hosts other databases and any write operations to these databases occur during the restore process, the revert operation will result in data loss.

  1. 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 databases), or in the Google Cloud region in which the target Cloud SQL instance resides (for PostgreSQL databases).

For more information on how to specify a project for worker instances, see Managing Worker Configurations.

  1. [Applies only to MySQL databases] Uses the worker instance to export databases, files, triggers and stored procedures of the processed database to the Temp subdirectory of the storage bucket where the backup repository resides.

For more information on SQL dump files, see Google Cloud documentation.

  1. [Applies only to MySQL databases] Uses native Google Cloud capabilities to import the exported data to the specified Cloud SQL instance.
  2. [Applies only to PostgreSQL databases] 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 specified Cloud SQL instance.
  3. Removes the worker instance from Google Cloud.
  4. [Applies only to MySQL instances] Removes the SQL dump file from the Temp subdirectory of the storage bucket.
  5. Deletes the temporary snapshot.

How to Perform Database Restore

To restore databases of a protected Cloud SQL instance, do the following:

  1. Launch the Database Restore wizard.
  2. Select databases.
  3. Select a project.
  4. Configure target instance settings.
  5. Check required permissions.
  6. Specify a restore reason.
  7. Finish working with the wizard.

Important

Before you start Cloud SQL database 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.