文档中心MogDBMogDB StackUqbar
v1.1

文档:v1.1

支持的版本:

ptk cluster upgrade

升级集群的数据库版本

语法

ptk cluster upgrade [flags]

示例

# Use the local installation package to upgrade
ptk cluster -n <CLUSTER_NAME> upgrade -p <LOCAL_DB_PACKAGE>

# Specifies the db version to upgrade (require network)
# When the ptk version is 1.2.0 or newer, it supports the direct upgrade of the database which contains plugins,
# and ptk will download the plugin installation package of the new version from the network
ptk cluster -n <CLUSTER_NAME> upgrade -t 5.0.6

# If current database contains plugins and no network available,
# you can download plugin installation packages to a fixed directory,
# and specified with '--plugin-dir'
ptk cluster -n <CLUSTER_NAME> upgrade -p <LOCAL_DB_PACKAGE> --plugin-dir <PLUGIN_DIR>

选项

-y, --assumeyes

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

-H, --host stringArray

  • 说明: 数据库实例 IP
  • 数据类型: stringArray
  • 默认值: []

-i, --id ints

  • 说明: 数据库实例 ID
  • 数据类型: ints
  • 默认值: []

-m, --mode string

  • 说明: 升级模式,可选项: [replace, cover]
  • 数据类型: string
  • 默认值: "replace"

-p, --package string

  • 说明: 目标安装包路径
  • 数据类型: string
  • 默认值: ""

--parallel uint

  • 说明: 同时操作的数据库的最大数量

通常小于 sshd_config 中 MaxSessions 的值

  • 数据类型: uint
  • 默认值: 10

--plugin-dir string

  • 说明: 待升级的插件目录
  • 数据类型: string
  • 默认值: ""

--plugin-upgrade-patch string

  • 说明: 插件升级补丁的文件路径
  • 数据类型: string
  • 默认值: ""

-R, --remain

  • 说明: 升级剩余节点
  • 数据类型: bool
  • 默认值: false

-t, --to-version string

  • 说明: 目标安装包版本 (依赖网络)
  • 数据类型: 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.