Azure allows restore of database backup on Azure SQL VM instance, directly from Azure container.
We have same requirement in Google cloud platform.
We have a Google SQL VM and we want to restore database backups directly from backup file available in Google cloud bucket.
Is there any direct connectivity available as it is available for Azure container?
Hi @bobalpradeep ,
Welcome to Google Cloud Community!
Yes, you can restore a database on a Google SQL VM from a backup file in a Google Cloud Storage bucket. To do this, you can use the **gcloud**
command-line tool to import the backup file into your SQL instance. The command will be similar to the following:
gcloud sql instances import [INSTANCE_NAME] gs://[BUCKET_NAME]/[BACKUP_FILE_NAME]
You can also use the Cloud Console to import the backup file.
Also, you can use the **mysqldump**
utility to export and import your data.
mysqldump --user=root --password=[PASSWORD] [DATABASE_NAME] > [BACKUP_FILE_NAME].sql
mysql -u [USER] -p[PASSWORD] [DATABASE_NAME] < [BACKUP_FILE_NAME].sql
It is also possible to use Cloud SQL’s automatic backups feature to create and manage backups for your SQL instances.
Here are some documentation references that will help you with restoring a database on a Google SQL VM from a Google Cloud Storage bucket:
Thanks