Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 30 additions & 0 deletions upgrade-tidb-using-tiup-offline.md
Original file line number Diff line number Diff line change
@@ -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. 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 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`.

{{< copyable "shell-regular" >}}

```bash
source .bash_profile
export TIUP_MIRRORS=/path/to/mirror
```

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

After the local mirror is updated, refer to [Upgrade TiDB Using TiUP](/upgrade-tidb-using-tiup.md) to upgrade the TiDB cluster.