We can do backup and restore on instance and DB level both. on-demand backup and automatic backup are possible at instance level only which we can configure Google Cloud Console.
Database level there is no options and features available for full and differential backup like SQL server in cloud SQL database.
We can do this task with Export feature this is similar to full backup and this we can do from console or portal.
If we want to do automated DB export (full backup) then we should design ourselves with the help of services . Google provide some services like Google Function and Scheduler which we can use for this purpose as look like following architecture.
Here is following steps which we can use to setup
- Create a bucket in Google Cloud Storage.
- Create Cloud Function to export a Cloud SQL database
- Grant Permission for the Cloud Function to access Cloud SQL export
- Test out the Cloud Function
- Create Cloud Scheduler Job to trigger the Cloud Function once a week