From 8af08d1b420f63215d120b7ac4ac8d3f5e6b04fe Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 10 Jun 2020 15:47:27 +0800 Subject: [PATCH 1/4] upgrade: add upgrade tidb using tiup offline --- upgrade-tidb-using-tiup-offline.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 upgrade-tidb-using-tiup-offline.md diff --git a/upgrade-tidb-using-tiup-offline.md b/upgrade-tidb-using-tiup-offline.md new file mode 100644 index 0000000000000..8d444709ded1e --- /dev/null +++ b/upgrade-tidb-using-tiup-offline.md @@ -0,0 +1,30 @@ +--- +title: Upgrade TiDB Using TiUP Offline Mirror +summary: Learn how to upgrade TiDB using the TiUP offline mirror. +category: how-to +--- + +# Upgrade TiDB Using TiUP Offline Mirror + +This document describes how to upgrade TiDB using TiUP offline mirror. + +## Update TiUP offline mirror + +1. To update the local TiUP offline mirror, refer to Step 1 and Step 2 in [Deploy a TiDB Cluster Offline Using TiUP](/production-offline-deployment-using-tiup.md) to download and deploy the new version of the TiUP offline mirror. + + After you execute `local_install.sh`, TiUP completes the overwrite upgrade. + +2. Redeclare the global environment variables according to the result of `local_install.sh`. Set `TIUP_MIRRORS` to `/path/to/mirror`, the location of the offline mirror package printed by `local_install.sh`. + + {{< copyable "shell-regular" >}} + + ```bash + source .bash_profile + export TIUP_MIRRORS=/path/to/mirror + ``` + + The offline mirror is successfully updated. After the overwrite upgrade, if an error is reported when TiUP is running, the cause might be that `manifest` is not updated. You can execute `rm -rf ~/.tiup/manifests` before using TiUP. + +## Update TiDB cluster + +After the local mirror is updated, refer to [Upgrade TiDB Using TiUP](/upgrade-tidb-using-tiup.md) to upgrade the TiDB cluster. From b1556557b3820f499551f53caea0ba17d3e8cfa8 Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 10 Jun 2020 15:50:59 +0800 Subject: [PATCH 2/4] minor edit --- upgrade-tidb-using-tiup-offline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade-tidb-using-tiup-offline.md b/upgrade-tidb-using-tiup-offline.md index 8d444709ded1e..eb7445cd38b8a 100644 --- a/upgrade-tidb-using-tiup-offline.md +++ b/upgrade-tidb-using-tiup-offline.md @@ -25,6 +25,6 @@ This document describes how to upgrade TiDB using TiUP offline mirror. The offline mirror is successfully updated. After the overwrite upgrade, if an error is reported when TiUP is running, the cause might be that `manifest` is not updated. You can execute `rm -rf ~/.tiup/manifests` before using TiUP. -## Update TiDB cluster +## Upgrade TiDB cluster After the local mirror is updated, refer to [Upgrade TiDB Using TiUP](/upgrade-tidb-using-tiup.md) to upgrade the TiDB cluster. From c152ea321319e5c08ec5220edf8715d38306827b Mon Sep 17 00:00:00 2001 From: Ran Date: Thu, 11 Jun 2020 13:38:45 +0800 Subject: [PATCH 3/4] Update TOC.md --- TOC.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TOC.md b/TOC.md index e386ef62acb81..3a14e7330d66f 100644 --- a/TOC.md +++ b/TOC.md @@ -50,6 +50,7 @@ + Maintain + Upgrade + [Use TiUP (Recommended)](/upgrade-tidb-using-tiup.md) + + [Use TiUP Offline (Recommended)](/upgrade-tidb-using-tiup-offline.md) + [Use TiDB Operator](https://pingcap.com/docs/tidb-in-kubernetes/stable/upgrade-a-tidb-cluster/) + [Use TiDB Ansible](/upgrade-tidb-using-ansible.md) + Scale From a5fdb811da35498b711b3642a15ff9414267ab80 Mon Sep 17 00:00:00 2001 From: yikeke Date: Thu, 11 Jun 2020 14:40:00 +0800 Subject: [PATCH 4/4] some minor edits --- upgrade-tidb-using-tiup-offline.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upgrade-tidb-using-tiup-offline.md b/upgrade-tidb-using-tiup-offline.md index eb7445cd38b8a..2cfeb909f608a 100644 --- a/upgrade-tidb-using-tiup-offline.md +++ b/upgrade-tidb-using-tiup-offline.md @@ -6,13 +6,13 @@ category: how-to # Upgrade TiDB Using TiUP Offline Mirror -This document describes how to upgrade TiDB using TiUP offline mirror. +This document describes how to upgrade TiDB using TiUP offline mirror. The upgrade steps are as follows. ## Update TiUP offline mirror 1. To update the local TiUP offline mirror, refer to Step 1 and Step 2 in [Deploy a TiDB Cluster Offline Using TiUP](/production-offline-deployment-using-tiup.md) to download and deploy the new version of the TiUP offline mirror. - After you execute `local_install.sh`, TiUP completes the overwrite upgrade. + After you execute `local_install.sh`, TiUP completes the overwrite and upgrade. 2. Redeclare the global environment variables according to the result of `local_install.sh`. Set `TIUP_MIRRORS` to `/path/to/mirror`, the location of the offline mirror package printed by `local_install.sh`. @@ -23,7 +23,7 @@ This document describes how to upgrade TiDB using TiUP offline mirror. export TIUP_MIRRORS=/path/to/mirror ``` - The offline mirror is successfully updated. After the overwrite upgrade, if an error is reported when TiUP is running, the cause might be that `manifest` is not updated. You can execute `rm -rf ~/.tiup/manifests` before using TiUP. + The offline mirror is successfully updated. After the overwrite, if an error is reported when TiUP is running, it might be that `manifest` is not updated. To fix this, you can execute `rm -rf ~/.tiup/manifests` before using TiUP. ## Upgrade TiDB cluster