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...]
Flags:
-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