How to upgrade components after upgrading from 6.5.2 to 7.1?

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 从6.5.2升级到7.1后,组件怎么升级?

| username: zhanggame1

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] 7.1
[Reproduction Path] Dumping data from other databases and then importing with Lightning
[Encountered Problem: Issue Phenomenon and Impact]
Upgraded from version 6.5.2 to 7.1
Lightning import prompts “Cluster version check failed: [Lightning:Common:ErrVersionMismatch] TiDB version too new, expected to be within [4.0.0, 7.0.0)| ‘7.1.0’”
Found that the versions of Dumpling and Lightning were not upgraded, how to handle this
[Resource Configuration]


| username: CuteRay | Original post link

Run tiup tidb-lightning -V to check which version it is.

| username: CuteRay | Original post link

tiup update tidb-lightning:v7.1.0
or this command to upgrade individual components

| username: redgame | Original post link

Check the logs for the upgrade failure message.

| username: 我是咖啡哥 | Original post link

Directly add the directory of the new version’s extracted files to the environment variable for convenience. Using tiup adds an extra layer, which feels a bit awkward. :grinning:

| username: zhanggame1 | Original post link

Can I unzip and overwrite the original?

| username: 我是咖啡哥 | Original post link

You can back up the original directory and try overwriting it. It’s just an executable file, so it should be fine. But I haven’t tried it myself.

| username: zhanggame1 | Original post link

Not quite right.

| username: Anna | Original post link

Upgrading Components

After the official components provide a new version, you can use the tiup update command to upgrade the components. Except for the following parameters, the usage of this command is basically the same as tiup install:

  • --all: Upgrade all components
  • --nightly: Upgrade to the nightly version
  • --self: Upgrade TiUP itself to the latest version
  • --force: Force upgrade to the latest version

Example 1: Upgrade all components to the latest version

tiup update --all

Example 2: Upgrade all components to the nightly version

tiup update --all --nightly

Example 3: Upgrade TiUP to the latest version

tiup update --self

Running Components

After installation, you can use the tiup <component> command to start the corresponding component:

tiup [flags] <component>[:version] [args...]

  -T, --tag string                     Specify a tag for the component instance

This command requires the name of a component and an optional version. If no version is provided, the latest stable version installed will be used.

Before starting the component, TiUP will first create a directory for it and then run the component in that directory. The component will generate all data in that directory, and the directory name will be the tag name specified when the component is running. If no tag is specified, a tag name will be randomly generated, and the working directory will be automatically deleted when the instance terminates.

If you want to start the same component multiple times and reuse the previous working directory, you can specify the same name with --tag when starting. After specifying the tag, the working directory will not be automatically deleted when the instance terminates, making it convenient to reuse it the next time you start.

Example 1: Run version v7.1.0 of TiDB

tiup tidb:v7.1.0

Example 2: Specify a tag to run TiKV

tiup --tag=experiment tikv

Querying Component Running Status

You can use the tiup status command to check the running status of components:

tiup status

Running this command will give you a list of instances, one per line. The list includes these columns:

  • Name: The tag name of the instance
  • Component: The name of the component of the instance
  • PID: The process ID of the running instance
  • Status: The status of the instance, RUNNING means it is running, TERM means it has terminated
  • Created Time: The start time of the instance
  • Directory: The working directory of the instance, which can be specified with --tag
  • Binary: The executable program of the instance, which can be specified with --binpath
  • Args: The running parameters of the instance
| username: zhanggame1 | Original post link

Problem solved. Just follow the steps in the official manual to rerun the merge installation package.


tar xf tidb-community-toolkit-v7.1.0-linux-amd64.tar.gz
ls -ld tidb-community-server-v7.1.0-linux-amd64 tidb-community-toolkit-v7.1.0-linux-amd64
cd tidb-community-server-v7.1.0-linux-amd64/
cp -rp keys ~/.tiup/
tiup mirror merge ../tidb-community-toolkit-v7.1.0-linux-amd64
| username: Anna | Original post link

It already indicates that you need to upgrade to a version below 7.0.0. Version 7.1.0 is too new and not yet supported.

| username: Anna | Original post link

Follow the error prompts and solve them step by step.

| username: Anna | Original post link

I checked the description of version 7.1, and it mentions that this version is temporarily unstable. Please upgrade to a stable version before testing.

In TiDB v7.1.0, the partitioned Raft KV engine is compatible with TiFlash and supports tools such as TiDB Lightning, BR, and TiCDC.

This feature is currently experimental and not recommended for use in production environments. It is currently only supported for use in new clusters with the new engine and does not support direct upgrades from the original TiKV storage engine to this engine.

For more information, please refer to the user documentation.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.