文档中心MogDBMogDB StackUqbar
v1.1

文档:v1.1

支持的版本:

ptk cluster demote

将数据库角色从 Primary 降级为 Standby,或从 Standby 降级为 Cascade Standby

语法

ptk cluster demote [flags]

示例

ptk cluster -n <CLUSTER_NAME> demote -H <IP>
ptk cluster -n <CLUSTER_NAME> demote -i <ID>

# If the specified instance is a standby database,
# the '--upstream' parameter must also be used to specify the upstream standby's IP
# when it is downgraded to cascade_standby
ptk cluster -n <CLUSTER_NAME> demote --upstream <ANOTHER_STANDBY_IP>

选项

-H, --host string

  • 说明: 要降级的数据库实例的 IP
  • 数据类型: string
  • 默认值: ""

-i, --id int

  • 说明: 要降级的数据库实例的 ID
  • 数据类型: int
  • 默认值: 0

--upstream string

  • 说明: 上游数据库 IP
  • 数据类型: string
  • 默认值: ""

从父命令继承的选项

--disable-color

  • 说明: 禁用彩色日志
  • 数据类型: bool
  • 默认值: false

--disable-debug-log

  • 说明: 不生成调试日志文件
  • 数据类型: bool
  • 默认值: false

--disable-progressbar

  • 说明: 全局不显示进度条
  • 数据类型: bool
  • 默认值: false

-h, --help

  • 说明: 打印帮助信息
  • 数据类型: bool
  • 默认值: false

--log-file string

  • 说明: 指定运行日志文件路径
  • 数据类型: string
  • 默认值: ""

--log-format string

  • 说明: 指定运行日志的输出格式, 可选项: [text, json]
  • 数据类型: string
  • 默认值: "text"

--log-level string

  • 说明: 指定运行日志级别, 可选项: [debug, info, warning, error, panic]
  • 数据类型: string
  • 默认值: "info"

-n, --name string

  • 说明: 集群名称
  • 数据类型: string
  • 默认值: ""

--silence

  • 说明: 不打印日志到标准输出
  • 数据类型: bool
  • 默认值: false

--skip-fix-ssh

  • 说明: 无需通过交互修复 ssh 连接
  • 数据类型: bool
  • 默认值: false

开始支持的版本

v0.7

另请参阅

Copyright © 2011-2024 www.enmotech.com All rights reserved.