删除 .tiup 目录后,重新安装tiup,使用 tiup cluster list 无法查看原有集群,如何将集群添加到tiup管理

可以定期备份下 tiup 元数据

tiup cluster meta
Usage:
  meta [command]

Available Commands:
  backup      backup topology and other information of cluster
  restore     restore topology and other information of cluster

Flags:
  -h, --help   help for meta

Global Flags:
  -c, --concurrency int     max number of parallel tasks allowed (default 5)
      --format string       (EXPERIMENTAL) The format of output, available values are [default, json] (default "default")
      --ssh string          (EXPERIMENTAL) The executor type: 'builtin', 'system', 'none'.
      --ssh-timeout uint    Timeout in seconds to connect host via SSH, ignored for operations that don't need an SSH connection. (default 5)
      --wait-timeout uint   Timeout in seconds to wait for an operation to complete, ignored for operations that don't fit. (default 120)
  -y, --yes                 Skip all confirmations and assumes 'yes'

Use "meta help [command]" for more information about a command.
1 个赞