停止在GCP CloudSQL上的只读副本实例

huangapple go评论61阅读模式
英文:

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.

停止在GCP CloudSQL上的只读副本实例

Is there any way to stop the read replica instance of cloudsql along with main instance properly ?

答案1

得分: 1

以下是翻译好的部分:

Disable Replication

  1. 转到Cloud SQL实例页面

  2. 选择要禁用的只读复制

  3. 单击“禁用复制”,然后在弹出窗口上单击“禁用”

Delete Read Replica

  1. 转到Cloud SQL实例页面

  2. 选择要禁用的只读复制

  3. 单击“编辑”,确保在数据保护下取消选中启用删除保护,然后单击“保存”

  4. 单击“删除”,然后在弹出窗口中输入“read-replica-name”

英文:

For us to stop read replication, we have two options:

Disable Replication

  1. Go to Cloud SQL Instance page

  2. Select the read replica you want to disable

    停止在GCP CloudSQL上的只读副本实例

  3. Click DISABLE REPLICATION then click on DISABLE when a pop-up display

    停止在GCP CloudSQL上的只读副本实例

Delete Read Replica

  1. Go to Cloud SQL Instance page

  2. Select the read replica you want to disable

    停止在GCP CloudSQL上的只读副本实例

  3. Click on EDIT and make sure that under Data Protection, Enable deletion protection is unchecked then click on SAVE.

    停止在GCP CloudSQL上的只读副本实例

    停止在GCP CloudSQL上的只读副本实例

  4. Click DELETE then type in the read-replica-name when a pop-up display

    停止在GCP CloudSQL上的只读副本实例

    停止在GCP CloudSQL上的只读副本实例

huangapple
  • 本文由 发表于 2023年3月10日 01:02:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/75687787.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定