Google Professional Cloud Database Engineer Question 187
Select 2Google Cloud PlatformYour team manages a PostgreSQL database hosted on Cloud SQL. To reduce manual effort, you need to automate routine tasks such as backups, maintenance, and automatic failover. Which of the following steps would you take to set up automation for these tasks?
- A
Enable automated backups in the Cloud SQL instance settings.
- B
Configure a Cloud Scheduler job to trigger database backups via a custom script.
- C
Enable the High Availability (HA) configuration for automatic failover.
- D
Set up a cron job on a Compute Engine VM to perform database maintenance tasks.
- E
Enable database flags for maintenance operations in Cloud SQL.
Show answer and explanation
Correct answers: A, C
Explanation
To automate database tasks in Cloud SQL, you should leverage the platform's built-in features such as automated backups and High Availability (HA) for failover. Cloud Scheduler and Compute Engine-based solutions may require additional effort and are redundant for tasks already supported natively by Cloud SQL.
- A. Correct.
This is correct. Enabling automated backups in the Cloud SQL instance settings ensures that backups are performed regularly without manual intervention.
- B. Incorrect.
This is incorrect. While it is possible to use Cloud Scheduler and custom scripts for backups, Cloud SQL already provides a built-in automated backups feature, which is simpler and more reliable.
- C. Correct.
This is correct. Enabling the High Availability (HA) configuration in Cloud SQL ensures automatic failover to a standby instance in case of failure.
- D. Incorrect.
This is incorrect. Using a Compute Engine VM and cron jobs is not necessary for maintenance tasks, as Cloud SQL provides managed maintenance options.
- E. Incorrect.
This is incorrect. Database flags in Cloud SQL are used to configure specific database settings, but they do not handle maintenance operations automatically.