Google Associate Cloud Engineer Question 252
Select 3Google Cloud PlatformYou are managing a Cloud SQL instance running MySQL on Google Cloud Platform. Your organization requires that you have a reliable backup and restore strategy in place. What steps should you take to ensure you can back up and restore the database instance effectively?
- A
Enable automated backups on the Cloud SQL instance.
- B
Set up a scheduled task in Google Cloud Functions to export the database to Cloud Storage daily.
- C
Configure binary logging for point-in-time recovery.
- D
Use the 'gcloud sql export' command to create on-demand backups and store them in a secure location.
- E
Create a Cloud Pub/Sub topic to receive notifications for backup failures.
Show answer and explanation
Correct answers: A, C, D
Explanation
To effectively back up and restore a Cloud SQL instance, you should enable automated backups to ensure regular backups are taken without manual intervention. Configuring binary logging is important for point-in-time recovery, which allows you to restore the database to any specific time. Additionally, using the 'gcloud sql export' command for on-demand backups provides an extra layer of control and security for your backup strategy. While setting up notifications for failures can enhance monitoring, it is not directly involved in the backup or restore process.
- A. Correct.
Enabling automated backups on the Cloud SQL instance allows Google Cloud to automatically back up your database on a regular schedule, which is essential for recovery.
- B. Incorrect.
While exporting the database using Google Cloud Functions could back up data, it is not the most straightforward or reliable method compared to built-in Cloud SQL features.
- C. Correct.
Configuring binary logging enables point-in-time recovery, which is crucial for restoring your database to a specific state in case of data loss.
- D. Correct.
Using the 'gcloud sql export' command allows you to create backups on-demand, complementing automated backups and providing more control over backup timing and storage.
- E. Incorrect.
Creating a Cloud Pub/Sub topic for backup failure notifications is useful for monitoring but does not directly contribute to the backup and restore process.