During an internal audit, you realized that one of your Cloud SQL for MySQL instances does not have high availability (HA) enabled. You want to follow Google-recommended practices to enable HA on your existing instance. What should you do?
A.
Create a new Cloud SQL for MySQL instance, enable HA, and use the export and import option to migrate your data.
B.
Create a new Cloud SQL for MySQL instance, enable HA, and use Cloud Data Fusion to migrate your data.
C.
Use the gcloud instances patch command to update your existing Cloud SQL for MySQL instance.
D.
Shut down your existing Cloud SQL for MySQL instance, and enable HA.
A and B are obviously wrong, but it's still a bit confusing with the last two:
C - `gcloud instances patch` is not complete, it should be `gcloud sql instances patch`, so I would consider it to be wrong, if not the D - you can't edit your instance (i.e. enable HA) when it's shut down, you can only do it when instance is running, and then it will restart.
So I'll go for C
C.
You can add a failover replica to an already created and running Cloud SQL instance. This can be done from the console or by using gcloud. The gcloud command is:
gcloud sql instances patch INSTANCE_NAME \
--availability-type REGIONAL \
--enable-bin-log \
--backup-start-time=HH:MM
No need to create a new Cloud SQL instance. Eliminate A and B. Adding HA requires you to edit the configuration which you can’t do if the instance is down. So D is wrong.
The correct option is C. Use the gcloud instances patch command to update your existing Cloud SQL for MySQL instance.
Explanation:
Creating a new instance and migrating data can be time-consuming and disruptive to your application's availability. Shutting down the existing instance is not a recommended approach, as it will cause downtime for your application.
The recommended approach is to use the gcloud instances patch command to enable high availability on your existing Cloud SQL for MySQL instance. This command updates the instance's configuration to enable the failover replica, configure it, and enable automatic failover.
By following this approach, you can ensure minimal downtime, and your application can continue to operate during the process.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
chelbsik
Highly Voted 1 year, 10 months agochelbsik
1 year, 10 months agoRyannn23
1 year, 3 months agodija123
Most Recent 5 months, 1 week agokfiryo
11 months, 1 week agodynamic_dba
1 year, 7 months agoHilab
1 year, 8 months agopk349
1 year, 10 months agossaporylo
1 year, 9 months ago