Setting Offline Mirror with tiup set mirror: Unable to Change Specification After Configuration Error

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

Original topic: tiup set mirror设置离线镜像,配置错误后,无法更改指定

| username: freywan

[Problem Encountered] Changing an already built image to local offline mode, after configuring the wrong mirror source, unable to switch to other mirrors.
[Reproduction Path]

  1. Downloaded the v5.4.0 TiDB image package, including all DM components, from the URL: 分布式数据库 TiDB 社区版 | PingCAP.

  2. Following the commands provided in the official documentation, extracted the package, and repackaged all DM-related components, including: dm-master, dm-worker, dmctl, grafana, prometheus.


    Packaged as: tidb-dm-v5.4.0-linux-amd64.tar.gz

  3. Downloaded root.json, used the specified format to change to a local mirror.



    image
    [Problem Phenomenon and Impact] After configuration, executing any tiup related commands results in

How can I manually change the mirror direction now?

Currently, after checking the official commands, I found that the tiup component and DM component were not packaged, and the mirror needs to be a folder rather than a compressed package.

| username: srstack | Original post link

tiup mirror set --reset

| username: freywan | Original post link

Executing this command prompts an error with the parameters.

| username: srstack | Original post link

tiup mirror set -h

| username: srstack | Original post link

It could also be that your tiup version is too low. Use this: tiup mirror set https://tiup-mirrors.pingcap.com

| username: freywan | Original post link

The results of the two commands

I would like to ask, this configuration should ultimately be written locally. Is there a corresponding configuration file that can be manually modified?

| username: BraveChen | Original post link

I understand that your goal is to create a custom image package that includes the DM component. If that’s the case, please refer to the article I wrote about the process of installing non-local image source components in an offline TiDB environment - “The Same” column - 专栏 - 记一次tidb离线环境下安装非本地镜像源组件的过程 | TiDB 社区

| username: freywan | Original post link

Thank you, I can refer to your offline image creation process. For now, I need to revert the incorrectly configured image, as the tiup component is currently unusable. :rofl:

| username: freywan | Original post link

I found it. In the .tiup root directory, there is a tiup.toml file. Deleting the mirror configuration item will solve the problem. :rofl:

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.