Tiup mirror merge

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

Original topic: tiup mirror merge

| username: Raymond

When executing tiup mirror merge tidb-server directory, an error occurs:
Error: lstat /home/tidb/.tiup/keys: no such file or directory
How should this be resolved?

What do the following points in the official documentation mean?

  • The administrator ID of all components in the target mirror must exist in the current mirror.
  • The ${TIUP_HOME}/keys directory of the user executing this command must contain all the private keys corresponding to the administrator IDs in the current mirror (you can use the command tiup mirror set to switch the current mirror to one that you have permission to modify).

What does administrator ID mean?

| username: ddhe9527 | Original post link

cd tidb-community-server-${version}-linux-amd64/
cp -rp keys ~/.tiup/

| username: cs58_dba | Original post link

Refer to this: the keys are probably gone.

| username: 啦啦啦啦啦 | Original post link

Refer to the offline deployment documentation:

| username: Raymond | Original post link

I have a question here. Suppose my current tiup mirror is tidb-community-server-v4.0.15-linux-amd64
[tidb@mysql05 tidb-community-server-v4.0.15-linux-amd64]$ tiup mirror show
/home/tidb/tidb-community-server-v4.0.15-linux-amd64
I want to merge tidb-community-server-v5.4.0-linux-amd64 into tidb-community-server-v4.0.15. Why do I need to copy the keys from tidb-community-server-v4.0.15-linux-amd64 to /home/tidb/.tiup instead of copying the keys from tidb-community-server-v5.4.0-linux-amd64 to /home/tidb/.tiup?
Which one is the target mirror? According to my understanding, tidb-community-server-v5.4.0 should be the target mirror, right?

[tidb@mysql05 ~]$ tiup mirror show
/home/tidb/tidb-community-server-v4.0.15-linux-amd64
[tidb@mysql05 ~]$ cp -r tidb-community-server-v5.4.0-linux-amd64/keys/ /home/tidb/.tiup/
[tidb@mysql05 ~]$ tiup merge tidb-community-server-v5.4.0-linux-amd64
The component merge version is not installed; downloading from repository.
The component merge not found (may be deleted from repository); skipped
Failed to start component merge
Error: use tiup install merge to install component merge first: component not installed
Copying /home/tidb/tidb-community-server-v5.4.0-linux-amd64/keys/ to /home/tidb/.tiup also doesn’t work

[tidb@mysql05 ~]$ cp -r tidb-community-server-v4.0.15-linux-amd64/keys/ /home/tidb/.tiup/
[tidb@mysql05 ~]$ tiup mirror merge tidb-community-server-v5.4.0-linux-amd64
Success
Copying the keys from tidb-community-server-v4.0.15-linux-amd64 to /home/tidb/.tiup works.

| username: Raymond | Original post link

What does “administrator ID of the component” mean?

| username: Raymond | Original post link

It’s a bit confusing who the target mirror is.

| username: 啦啦啦啦啦 | Original post link

In the document you posted, it is written that the private keys corresponding to the administrator ID in the current image are copied to the ${TIUP_HOME}/keys directory of the user executing the command. Then, tiup mirror merge the target image directory.

| username: Raymond | Original post link

May I ask:

The directory ${TIUP_HOME}/keys of the user executing this command contains all the private keys corresponding to the above administrator ID in the current image ------> What does administrator ID mean?
Also, * The administrator IDs of all components of the target image must exist in the current image. What does this sentence mean? In the example I provided, the target image should be tidb-community-server-v5.4.0-linux-amd64, right?

| username: 啦啦啦啦啦 | Original post link

You can refer to the documentation for these two commands:

| username: Raymond | Original post link

Okay, I will study it. First, let me ask you, teacher, my current mirror is /home/tidb/tidb-community-server-v4.0.15-linux-amd64, and I want to merge /home/tidb/tidb-community-server-v5.4.0-linux-amd64 into it. Are my steps correct? I see no errors when executing the commands.

[tidb@mysql05 ~]$ tiup mirror show
/home/tidb/tidb-community-server-v4.0.15-linux-amd64
[tidb@mysql05 ~]$ cp -r /home/tidb/tidb-community-server-v4.0.15-linux-amd64/keys/ -r /home/tidb/.tiup/
[tidb@mysql05 ~]$ tiup mirror merge /home/tidb/tidb-community-server-v5.4.0-linux-amd64
[tidb@mysql05 ~]$ tiup mirror show

| username: 啦啦啦啦啦 | Original post link

Correct, using tiup list followed by the component name allows you to see the available component versions in the mirror. If the merge is successful, you will be able to see the newly merged version.

| username: Raymond | Original post link

Got it, thank you, teacher.

| username: cs58_dba | Original post link

I feel like version 4.0 is a bit outdated, at least upgrade to version 5.0.

| username: system | Original post link

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