Skip to content

Commit

Permalink
Update remaining how-to pages to use new URL structure (pingcap#1111)
Browse files Browse the repository at this point in the history
Update how-to pages
  • Loading branch information
morgo authored May 10, 2019
1 parent 8cf45b3 commit 7c771a6
Show file tree
Hide file tree
Showing 24 changed files with 133 additions and 94 deletions.
42 changes: 21 additions & 21 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,38 +50,38 @@
- [Overview](dev/how-to/deploy/geographic-redundancy/overview.md)
- [Configure Location Awareness](dev/how-to/deploy/geographic-redundancy/location-awareness.md)
- [TiSpark](dev/how-to/deploy/tispark.md)
- [Data Migration with Ansible](/tools/dm/deployment.md)
- [Data Migration with Ansible](dev/how-to/deploy/data-migration-with-ansible.md)
+ Configure
- [Time Zone](sql/time-zone.md)
- [Memory Control](sql/tidb-memory-control.md)
+ Secure
+ Transport Layer Security (TLS)
- [Enable TLS For MySQL Clients](sql/encrypted-connections.md)
- [Enable TLS Between TiDB Components](op-guide/security.md)
- [Generate Self-signed Certificates](op-guide/generate-self-signed-certificates.md)
- [Enable TLS For MySQL Clients](dev/how-to/secure/enable-tls-clients.md)
- [Enable TLS Between TiDB Components](dev/how-to/secure/enable-tls-between-components.md)
- [Generate Self-signed Certificates](dev/how-to/secure/generate-self-signed-certificates.md)
+ Monitor
- [Overview](op-guide/monitor-overview.md)
- [Monitor a TiDB Cluster](op-guide/monitor.md)
- [Overview](dev/how-to/monitor/overview.md)
- [Monitor a TiDB Cluster](dev/how-to/monitor/monitor-a-cluster.md)
+ Migrate
- [Overview](op-guide/migration-overview.md)
- [Overview](dev/how-to/migrate/overview.md)
+ Migrate from MySQL
- [Migrate the Full Data](op-guide/migration.md)
- [Migrate the Incremental Data](op-guide/migration-incremental.md)
- [Migrate the Full Data](dev/how-to/migrate/from-mysql.md)
- [Migrate the Incremental Data](dev/how-to/migrate/incrementally-from-mysql.md)
- [Migrate from CSV](tools/lightning/csv.md)
+ Maintain
- [Backup and Restore](op-guide/backup-restore.md)
- [Backup and Restore](dev/how-to/maintain/backup-and-restore.md)
+ Scale
- [Scale a TiDB Cluster](op-guide/horizontal-scale.md)
- [Scale Using Ansible](op-guide/ansible-deployment-scale.md)
- [Identify Slow Queries](sql/slow-query.md)
- [Scale a TiDB Cluster](dev/how-to/maintain/scale/horizontally.md)
- [Scale using Ansible](dev/how-to/maintain/scale/with-ansible.md)
- [Identify Slow Queries](dev/how-to/maintain/identify-slow-queries.md)
+ Upgrade
- [Upgrade from TiDB 2.1](op-guide/tidb-v2.1-upgrade-guide.md)
- [Upgrade Data Migration](tools/dm/dm-upgrade.md)
- [Rolling Updates with Ansible](op-guide/ansible-deployment-rolling-update.md)
- [Upgrade from TiDB 2.1](dev/how-to/maintain/upgrade/from-previous-version.md)
- [Upgrade Data Migration](dev/how-to/maintain/upgrade/data-migration.md)
- [Rolling updates with Ansible](dev/how-to/maintain/upgrade/rolling-updates-with-ansible.md)
- Troubleshoot
- [Troubleshoot Cluster Setup](trouble-shooting.md)
- [Troubleshoot Data Migrations](tools/dm/troubleshooting.md)
- [Troubleshoot TiDB-Lightning](tools/lightning/errors.md)
- [Troubleshoot Cluster Setup](dev/how-to/troubleshoot/cluster-setup.md)
- [Troubleshoot Data Migration](dev/how-to/troubleshoot/data-migration.md)
- [Troubleshoot TiDB-Lightning](dev/how-to/troubleshoot/tidb-lightning.md)
+ Reference
- [MySQL Compatibility](sql/mysql-compatibility.md)
+ SQL
Expand Down Expand Up @@ -274,8 +274,8 @@
- [TiDB FAQs](FAQ.md)
- [TiDB-Lightning FAQs](tools/lightning/faq.md)
- [Upgrade FAQs](op-guide/upgrade-faq.md)
+ Support
- [Support Resources](support.md)
+ Support
- [Support Resources](support-resources.md)
- [Report an Issue](report-issue.md)
+ Contribute
- [Contribute to TiDB](contribute.md#contribute-to-tidb)
Expand Down
6 changes: 6 additions & 0 deletions contribute.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: Contribute
summary: Learn how to contribute to the TiDB database.
category: how-to
---

# Contribute

## Contribute to TiDB
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Deploy Data Migration Using DM-Ansible
summary: Use DM-Ansible to deploy the Data Migration cluster.
category: tools
category: how-to
aliases: ['/docs/tools/dm/deployment/']
---

# Deploy Data Migration Using DM-Ansible
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Backup and Restore
summary: Learn how to back up and restore the data of TiDB.
category: operations
category: how-to
aliases: ['/docs/op-guide/backup-restore/']
---

# Backup and Restore
Expand Down Expand Up @@ -38,7 +39,7 @@ cd tidb-enterprise-tools-latest-linux-amd64

## Full backup and restoration using `mydumper`/`loader`

You can use [`mydumper`](../tools/mydumper.md) to export data from MySQL and [`loader`](../tools/loader.md) to import the data into TiDB.
You can use [`mydumper`](/tools/mydumper.md) to export data from MySQL and [`loader`](/tools/loader.md) to import the data into TiDB.

> **Important**: You must use the `mydumper` from the Enterprise Tools package, and not the `mydumper` provided by your operating system's package manager. The upstream version of `mydumper` does not yet handle TiDB correctly ([#155](https://github.com/maxbube/mydumper/pull/155)). Using `mysqldump` is also not recommended, as it is much slower for both backup and restoration.
Expand Down Expand Up @@ -83,7 +84,7 @@ In this command,

### Restore data into TiDB

To restore data into TiDB, use `loader` to import the previously exported data. See [Loader instructions](../tools/loader.md) for more information.
To restore data into TiDB, use `loader` to import the previously exported data. See [Loader instructions](/tools/loader.md) for more information.

```bash
./bin/loader -h 127.0.0.1 -u root -P 4000 -t 32 -d ./var/test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
---
title: Slow Query Log
title: Identify Slow Queries
summary: Use the slow query log to identify problematic SQL statements.
category: user guide
category: how-to
aliases: ['/docs/sql/slow-query/']
---

# Slow Query Log
# Identify Slow Queries

The slow query log is a record of SQL statements that took a long time to perform.

A problematic SQL statement can increase the pressure on the entire cluster, resulting in a longer response time. To solve this problem, you can use the slow query log to identify the problematic statements and thus improve the performance.

### Obtain the log

By `grep` the keyword `SLOW_QUERY` in the log file of TiDB, you can obtain the logs of statements whose execution time exceeds [slow-threshold](../op-guide/tidb-config-file.md#slow-threshold).
By `grep` the keyword `SLOW_QUERY` in the log file of TiDB, you can obtain the logs of statements whose execution time exceeds [slow-threshold](/op-guide/tidb-config-file.md#slow-threshold).

You can edit `slow-threshold` in the configuration file and its default value is 300ms. If you configure the [slow-query-file](../op-guide/tidb-config-file.md#slow-query-file), all the slow query logs will be written in this file.
You can edit `slow-threshold` in the configuration file and its default value is 300ms. If you configure the [slow-query-file](/op-guide/tidb-config-file.md#slow-query-file), all the slow query logs will be written in this file.

### Usage example

Expand All @@ -32,7 +33,7 @@ This section describes fields in the slow query log based on the usage example a

#### `cost_time`

The execution time of this statement. Only the statements whose execution time exceeds [slow-threshold](../op-guide/tidb-config-file.md#slow-threshold) output this log.
The execution time of this statement. Only the statements whose execution time exceeds [slow-threshold](/op-guide/tidb-config-file.md#slow-threshold) output this log.

#### `process_time`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Scale a TiDB cluster
summary: Learn how to add or delete PD, TiKV and TiDB nodes.
category: operations
category: how-to
aliases: ['/docs/op-guide/horizontal-scale/']
---

# Scale a TiDB cluster
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Scale the TiDB Cluster Using TiDB-Ansible
summary: Use TiDB-Ansible to increase/decrease the capacity of a TiDB/TiKV/PD node.
category: operations
category: how-to
aliases: ['/docs/op-guide/ansible-deployment-scale/']
---

# Scale the TiDB Cluster Using TiDB-Ansible
Expand Down Expand Up @@ -482,4 +483,4 @@ For example, if you want to remove a PD node (node2) with the IP address `172.16
ansible-playbook rolling_update_monitor.yml --tags=prometheus
```

7. To monitor the status of the entire cluster, open a browser to access the monitoring platform: `http://172.16.10.3:3000`.
7. To monitor the status of the entire cluster, open a browser to access the monitoring platform: `http://172.16.10.3:3000`.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Upgrade Data Migration
summary: Learn how to upgrade a Data Migration version to an incompatible version.
category: tools
category: how-to
aliases: ['/docs/tools/dm/dm-upgrade/']
---

# Upgrade Data Migration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: TiDB 2.1 Upgrade Guide
summary: Learn how to upgrade from TiDB 2.0 (TiDB 2.0.1 or later) or TiDB 2.1 RC version to TiDB 2.1 GA version.
category: deployment
category: how-to
aliases: ['/docs/op-guide/tidb-v2.1-upgrade-guide/']
---

# TiDB 2.1 Upgrade Guide
Expand All @@ -10,9 +11,9 @@ This document describes how to upgrade from TiDB 2.0 (TiDB 2.0.1 or later) or Ti

> **Note:**
>
> TiDB 2.1 is not compatible with the Kafka version of TiDB-Binlog. If your current TiDB cluster has already been using the [Kafka version of TiDB-Binlog](../tools/tidb-binlog-kafka.md), you need to [upgrade it to the cluster version of TiDB-Binlog](../tools/tidb-binlog-cluster.md#tidb-binlog-upgrade).
> TiDB 2.1 is not compatible with the Kafka version of TiDB-Binlog. If your current TiDB cluster has already been using the [Kafka version of TiDB-Binlog](/tools/tidb-binlog-kafka.md), you need to [upgrade it to the cluster version of TiDB-Binlog](/tools/tidb-binlog-cluster.md#tidb-binlog-upgrade).
For details about using Ansible to perform a rolling update to each component, see [Perform a rolling update using Ansible](../op-guide/ansible-deployment-rolling-update.md#perform-a-rolling-update-using-ansible).
For details about using Ansible to perform a rolling update to each component, see [Perform a rolling update using Ansible](/dev/how-to/maintain/upgrade/rolling-updates-with-ansible.md#perform-a-rolling-update-using-ansible).

## Upgrade caveat

Expand All @@ -30,7 +31,7 @@ Do not execute any DDL statements during the upgrading process, otherwise the un

TiDB-Ansible release-2.1 depends on Ansible 2.4.2 ~ 2.7.0 (`ansible>=2.4.2,<2.7.0`) and the Python module `jinja2>=2.9.6` and `jmespath>=0.9.0`.

To make it easy to manage dependencies, use `pip` to install Ansible and its dependencies. For details, see [Install Ansible and its dependencies on the Control Machine](../op-guide/ansible-deployment.md#step-4-install-ansible-and-its-dependencies-on-the-control-machine). For offline environment, see [Install Ansible and its dependencies offline on the Control Machine](../op-guide/offline-ansible-deployment.md#step-3-install-ansible-and-its-dependencies-offline-on-the-control-machine).
To make it easy to manage dependencies, use `pip` to install Ansible and its dependencies. For details, see [Install Ansible and its dependencies on the Control Machine](/dev/how-to/deploy/orchestrated/ansible.md#step-4-install-ansible-and-its-dependencies-on-the-control-machine). For offline environment, see [Install Ansible and its dependencies offline on the Control Machine](/dev/how-to/deploy/orchestrated/offline-ansible.md#step-3-install-ansible-and-its-dependencies-offline-on-the-control-machine).

After the installation is finished, you can view the version information using the following command:

Expand Down Expand Up @@ -75,7 +76,7 @@ Log in to the Control Machine using the `tidb` user account and enter the `/home
Edit the `inventory.ini` file. For IP information, see the `/home/tidb/tidb-ansible-bak/inventory.ini` backup file.
Pay special attention to the following variables configuration. For variable meaning, see [Description of other variables](../op-guide/ansible-deployment.md#edit-other-variables-optional).
Pay special attention to the following variables configuration. For variable meaning, see [Description of other variables](/dev/how-to/deploy/orchestrated/ansible.md#edit-other-variables-optional).
1. Make sure that `ansible_user` is the normal user. For unified privilege management, remote installation using the root user is no longer supported. The default configuration uses the `tidb` user as the SSH remote user and the program running user.
Expand All @@ -85,7 +86,7 @@ Pay special attention to the following variables configuration. For variable mea
ansible_user = tidb
```
You can refer to [How to configure SSH mutual trust and sudo rules on the Control Machine](../op-guide/ansible-deployment.md#step-5-configure-the-ssh-mutual-trust-and-sudo-rules-on-the-control-machine) to automatically configure the mutual trust among hosts.
You can refer to [How to configure SSH mutual trust and sudo rules on the Control Machine](/dev/how-to/deploy/orchestrated/ansible.md#step-5-configure-the-ssh-mutual-trust-and-sudo-rules-on-the-control-machine) to automatically configure the mutual trust among hosts.
2. Keep the `process_supervision` variable consistent with that in the previous version. It is recommended to use `systemd` by default.
Expand All @@ -94,7 +95,7 @@ Pay special attention to the following variables configuration. For variable mea
process_supervision = systemd
```
If you need to modify this variable, see [How to modify the supervision method of a process from `supervise` to `systemd`](../op-guide/ansible-deployment.md#how-to-modify-the-supervision-method-of-a-process-from-supervise-to-systemd). Before you upgrade, first use the `/home/tidb/tidb-ansible-bak/` backup branch to modify the supervision method of a process.
If you need to modify this variable, see [How to modify the supervision method of a process from `supervise` to `systemd`](/dev/how-to/deploy/orchestrated/ansible.md#how-to-modify-the-supervision-method-of-a-process-from-supervise-to-systemd). Before you upgrade, first use the `/home/tidb/tidb-ansible-bak/` backup branch to modify the supervision method of a process.
### Edit the configuration file of TiDB cluster components
Expand Down Expand Up @@ -132,4 +133,4 @@ $ ansible-playbook rolling_update.yml

```
$ ansible-playbook rolling_update_monitor.yml
```
```
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Upgrade TiDB Using TiDB-Ansible
summary: Use TiDB-Ansible to perform a rolling update for a TiDB cluster.
category: operations
category: how-to
aliases: ['/docs/op-guide/ansible-deployment-rolling-update/']
---

# Upgrade TiDB Using TiDB-Ansible
Expand All @@ -16,8 +17,8 @@ When you perform a rolling update for a TiDB cluster, the service is shut down s

- To upgrade between large versions, you must upgrade [`tidb-ansible`](https://github.com/pingcap/tidb-ansible).

- To upgrade the TiDB version from 1.0 to 2.0, see [TiDB 2.0 Upgrade Guide](../op-guide/tidb-v2.0-upgrade-guide.md).
- To upgrade the TiDB version from 2.0 to 2.1, see [TiDB 2.1 Upgrade Guide](../op-guide/tidb-v2.1-upgrade-guide.md).
- To upgrade the TiDB version from 1.0 to 2.0, see [TiDB 2.0 Upgrade Guide](/op-guide/tidb-v2.0-upgrade-guide.md).
- To upgrade the TiDB version from 2.0 to 2.1, see [TiDB 2.1 Upgrade Guide](/op-guide/tidb-v2.1-upgrade-guide.md).

- For a minor upgrade, it is also recommended to update `tidb-ansible` for the latest configuration file templates, features, and bug fixes.

Expand Down Expand Up @@ -151,4 +152,4 @@ This section describes how to modify component configuration using Ansible.
low-concurrency: 16
```
2. After modifying the component configuration, you need to perform a rolling update using Ansible. See [Perform a rolling update using Ansible](#perform-a-rolling-update-using-ansible).
2. After modifying the component configuration, you need to perform a rolling update using Ansible. See [Perform a rolling update using Ansible](#perform-a-rolling-update-using-ansible).
9 changes: 5 additions & 4 deletions op-guide/migration.md → dev/how-to/migrate/from-mysql.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Migrate Data from MySQL to TiDB
summary: Use `mydumper` and `loader` to migrate data from MySQL to TiDB.
category: operations
category: how-to
aliases: ['/docs/op-guide/migration/']
---

# Migrate Data from MySQL to TiDB
Expand All @@ -12,9 +13,9 @@ You can use `mydumper` to export data from MySQL and `loader` to import the data

> **Note:**
>
> Although TiDB also supports the official `mysqldump` tool from MySQL for data migration, it is not recommended to use it. Its performance is much lower than `mydumper` / `loader` and it takes much time to migrate large amounts of data. It is important to use the `mydumper` provided by TiDB and not the upstream `mydumper` version. See [mydumper](../tools/mydumper.md) for more information.
> Although TiDB also supports the official `mysqldump` tool from MySQL for data migration, it is not recommended to use it. Its performance is much lower than `mydumper` / `loader` and it takes much time to migrate large amounts of data. It is important to use the `mydumper` provided by TiDB and not the upstream `mydumper` version. See [mydumper](/tools/mydumper.md) for more information.
`Mydumper` and `loader` can be [downloaded as part of Enterprise Tools](../tools/download.md).
`Mydumper` and `loader` can be [downloaded as part of Enterprise Tools](/tools/download.md).

### Export data from MySQL

Expand All @@ -37,7 +38,7 @@ In this command,
### Import data to TiDB

Use `loader` to import the data from MySQL to TiDB. See [Loader instructions](../tools/loader.md) for more information.
Use `loader` to import the data from MySQL to TiDB. See [Loader instructions](/tools/loader.md) for more information.

```bash
./bin/loader -h 127.0.0.1 -u root -P 4000 -t 32 -d ./var/test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
title: Migrate Incrementally Using Syncer
summary: Use `mydumper`, `loader` and `syncer` tools to migrate data from MySQL to TiDB.
category: operations
category: how-to
aliases: ['/docs/op-guide/migration-incremental/']
---

# Migrate Incrementally Using Syncer

The [previous guide](../op-guide/migration.md) introduces how to import a full database from MySQL to TiDB using `mydumper`/`loader`. This methodology is not recommended for large databases with frequent updates, since it can lead to a larger downtime window during migration. It is instead recommended to use syncer.
The [previous guide](/dev/how-to/migrate/from-mysql.md) introduces how to import a full database from MySQL to TiDB using `mydumper`/`loader`. This methodology is not recommended for large databases with frequent updates, since it can lead to a larger downtime window during migration. It is instead recommended to use syncer.

Syncer can be [downloaded as part of Enterprise Tools](../tools/download.md).
Syncer can be [downloaded as part of Enterprise Tools](/tools/download.md).

Assuming the data from `t1` and `t2` is already imported to TiDB using `mydumper`/`loader`. Now we hope that any updates to these two tables are synchronized to TiDB in real time.

Expand Down
Loading

0 comments on commit 7c771a6

Please sign in to comment.