英文:
Stop Read Replica Instance on GCP CloudSQL
问题
停止 CloudSQL 实例的方法如下:
gcloud sql instances patch INSTANCE_NAME --activation-policy=NEVER
我们尝试过,但对于只读副本实例失败了,出现了如下错误:
ERROR: (gcloud.sql.instances.patch) HTTPError 400: Invalid request: Invalid flag for instance role: Activation policy for replica must be set to ALWAYS, currently 'NEVER'..
根据文档,我们不能为只读副本设置 NEVER
。
是否有任何方法可以正确停止 CloudSQL 的只读副本实例和主实例?
英文:
To stop a cloudsql instance
gcloud sql instances patch INSTANCE_NAME --activation-policy=NEVER
We tried and it failed for read replicas instances
ERROR: (gcloud.sql.instances.patch) HTTPError 400: Invalid request: Invalid flag for instance role: Activation policy for replica must be set to ALWAYS, currently 'NEVER'..
Now as per the docs, we can't set the NEVER
for read replicas.
Is there any way to stop the read replica instance of cloudsql
along with main instance properly ?
答案1
得分: 1
以下是翻译好的部分:
Disable Replication
-
转到Cloud SQL实例页面
-
选择要禁用的只读复制
-
单击“禁用复制”,然后在弹出窗口上单击“禁用”
Delete Read Replica
-
转到Cloud SQL实例页面
-
选择要禁用的只读复制
-
单击“编辑”,确保在数据保护下取消选中启用删除保护,然后单击“保存”
-
单击“删除”,然后在弹出窗口中输入“read-replica-name”
英文:
For us to stop read replication, we have two options:
- Disable replication
- Delete read replica
Disable Replication
-
Go to Cloud SQL Instance page
-
Select the read replica you want to disable
-
Click
DISABLE REPLICATION
then click onDISABLE
when a pop-up display
Delete Read Replica
-
Go to Cloud SQL Instance page
-
Select the read replica you want to disable
-
Click on
EDIT
and make sure that under Data Protection, Enable deletion protection is unchecked then click onSAVE
. -
Click
DELETE
then type in theread-replica-name
when a pop-up display
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论