A Cloud Engineer is responsible for verifying the disaster recovery preparedness of a production Cloud SQL for PostgreSQL instance configured with High Availability (HA). The engineer needs to perform a scheduled manual failover test to switch traffic to the standby instance with minimal operational disruption. Which gcloud command should the engineer execute to initiate this test?
- Execute gcloud sql instances failover INSTANCE_NAME to trigger an explicit failover to the standby replica.Answer
- BExecute gcloud sql instances restart INSTANCE_NAME --failover to force the primary instance to reboot onto the secondary zone.
- CExecute gcloud sql instances promote-replica INSTANCE_NAME to convert the failover standby node into a standalone primary instance.
- DExecute gcloud storage instances failover gs://INSTANCE_NAME to initiate the failover process.
Answer
Execute gcloud sql instances failover INSTANCE_NAME to trigger an explicit failover to the standby replica.
The correct option executes `gcloud sql instances failover INSTANCE_NAME`, which is the official Google Cloud CLI command designed specifically to initiate a manual failover test on a High Availability Cloud SQL instance.
Step-by-Step Solution
Key Concept
High Availability failover operation for Cloud SQL instances