文档中心MogDBMogDB StackUqbar
v1.1

文档:v1.1

支持的版本:

ptk cluster switchover

主备切换,升级备库为主库,降主库为备库

语法

ptk cluster switchover [flags]

示例

ptk cluster -n <CLUSTER_NAME> switchover -H <IP> [-m fast]
ptk cluster -n <CLUSTER_NAME> switchover -i <ID> [-m fast]

选项

-H, --host string

  • 说明: 要切换的数据库 IP
  • 数据类型: string
  • 默认值: ""

-i, --id int

  • 说明: 待切换的数据库实例 ID
  • 数据类型: int
  • 默认值: 0

-m, --mode string

  • 说明: 切换模式, 可选性: [fast, f]
  • 数据类型: string
  • 默认值: "fast"

从父命令继承的选项

--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.4

另请参阅

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