文档中心MogDBMogDB StackUqbar
v1.1

文档:v1.1

支持的版本:

ptk cluster scale-in

对一个MogDB集群进行缩容

语法

ptk cluster scale-in [flags]

示例

ptk cluster -n <CLUSTER_NAME> scale-in -H <IP1> -H <IP2> [-y]

# Scale in db instance but do not delete os user
ptk cluster -n <CLUSTER_NAME> scale-in -H <IP> --skip-clear-user

# Scale in db instance but do not delte db data
ptk cluster -n <CLUSTER_NAME> scale-in -H <IP> --skip-clear-db

# if target db instance is not accessible, you can kick out of cluster forcely
ptk cluster -n <CLUSTER_NAME> scale-in -H <IP> --force

选项

-y, --assumeyes

  • 说明: 自动对所有提问回复 Yes
  • 数据类型: bool
  • 默认值: false

--force

  • 说明: 如果无法通过 ssh 连接目标主机,强制从集群升级节点的配置中删除目标实例
  • 数据类型: bool
  • 默认值: false

-H, --host stringArray

  • 说明: 缩容的目标主机 IP
  • 数据类型: stringArray
  • 默认值: []

-i, --id ints

  • 说明: 缩容目标主机 ID
  • 数据类型: ints
  • 默认值: []

--skip-clear-db

  • 说明: 不清除目标数据库的目录
  • 数据类型: bool
  • 默认值: false

--skip-clear-user

  • 说明: 不删除目标数据库的系统用户
  • 数据类型: bool
  • 默认值: false

从父命令继承的选项

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

另请参阅

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