• TiDB Lightning 命令行参数


    你可以使用配置文件或命令行配置 TiDB Lightning。本文主要介绍 TiDB Lightning 的命令行参数。

    命令行参数

    tidb-lightning

    使用 tidb-lightning 可以对下列参数进行配置:

    参数描述对应配置项
    --config file从 file 读取全局设置。如果没有指定则使用默认设置。
    -V输出程序的版本
    -d directory读取数据的本地目录或外部存储 URLmydumper.data-source-dir
    -L level日志的等级: debug、info、warn、error 或 fatal (默认为 info)lightning.log-level
    -f rule表库过滤的规则 (可多次指定)mydumper.filter
    --backend backend选择导入的模式:local为 Physical Import Mode,tidb为 Logical Import Modelocal
    --log-file file日志文件路径(默认值为 /tmp/lightning.log.{timestamp}, 设置为 '-' 表示日志输出到终端)lightning.log-file
    --status-addr ip:portTiDB Lightning 服务器的监听地址lightning.status-port
    --importer host:portTiKV Importer 的地址tikv-importer.addr
    --pd-urls host:portPD endpoint 的地址tidb.pd-addr
    --tidb-host hostTiDB Server 的 hosttidb.host
    --tidb-port portTiDB Server 的端口(默认为 4000)tidb.port
    --tidb-status portTiDB Server 的状态端口的(默认为 10080)tidb.status-port
    --tidb-user user连接到 TiDB 的用户名tidb.user
    --tidb-password password连接到 TiDB 的密码,可为明文或 Base64 编码tidb.password
    --enable-checkpoint bool是否启用断点 (默认值为 true)checkpoint.enable
    --analyze level导入后分析表信息,可选值为 required、optional(默认值)、offpost-restore.analyze
    --checksum level导入后比较校验和,可选值为 required(默认值)、optional、offpost-restore.checksum
    --check-requirements bool开始之前检查集群版本兼容性(默认值为 true)lightning.check-requirements
    --ca fileTLS 连接的 CA 证书路径security.ca-path
    --cert fileTLS 连接的证书路径security.cert-path
    --key fileTLS 连接的私钥路径security.key-path
    --server-mode在服务器模式下启动 TiDB Lightninglightning.server-mode

    如果同时对命令行参数和配置文件中的对应参数进行更改,命令行参数将优先生效。例如,在 cfg.toml 文件中,不管对日志等级做出什么修改,运行 ./tidb-lightning -L debug --config cfg.toml 命令总是将日志级别设置为 “debug”。

    tidb-lightning-ctl

    所有 tidb-lightning 的参数也适用于 tidb-lightning-ctl。此外,使用 tidb-lightning-ctl 还可以对下列参数进行配置:

    参数描述
    --compact执行 full compact
    --switch-mode mode将每个 TiKV Store 切换到指定模式(normal 或 import)
    --fetch-mode打印每个 TiKV Store 的当前模式
    --import-engine uuid将 TiKV Importer 上关闭的引擎文件导入到 TiKV 集群
    --cleanup-engine uuid删除 TiKV Importer 上的引擎文件
    --checkpoint-dump folder将当前的断点以 CSV 格式存储到文件夹中
    --checkpoint-error-destroy tablename删除断点,如果报错则删除该表
    --checkpoint-error-ignore tablename忽略指定表中断点的报错
    --checkpoint-remove tablename无条件删除表的断点

    tablename 必须是`db`.`tbl` 中的限定表名(包括反引号),或关键词 all

  • 相关阅读:
    目前放疗中可用的一些开源软件
    Spring Boot配置文件
    es安装中文分词器
    基于SpringBoot+Vue的动漫漫画投稿网站 element
    linux手动安装scapy2.5
    谷歌学术镜像mark
    JavaSE反射前置之Properties类
    开发一个APP有多难?APP开发流程、开发成本揭秘
    maven工程结构搭建
    关于账本数据库:你想知道的这里都有
  • 原文地址:https://blog.csdn.net/weixin_42241611/article/details/126402005