You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: backup-and-restore-using-dumpling-lightning.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -83,4 +83,4 @@ The steps to manually modify the GC time are as follows:
83
83
84
84
## Restore data into TiDB
85
85
86
-
To restore data into TiDB, use TiDB Lightning to import the exported data. See [TiDB Lightning Tutorial](/tidb-lightning/tidb-lightning-tidb-backend.md).
86
+
To restore data into TiDB, use TiDB Lightning to import the exported data. See [TiDB Lightning Tutorial](/tidb-lightning/tidb-lightning-backends.md).
Copy file name to clipboardexpand all lines: backup-and-restore-using-mydumper-lightning.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -93,4 +93,4 @@ Then execute two more commands:
93
93
94
94
## Restore data into TiDB
95
95
96
-
To restore data into TiDB, use TiDB Lightning to import the exported data. See [TiDB Lightning Tutorial](/tidb-lightning/tidb-lightning-tidb-backend.md).
96
+
To restore data into TiDB, use TiDB Lightning to import the exported data. See [TiDB Lightning Tutorial](/tidb-lightning/tidb-lightning-backends.md).
Copy file name to clipboardexpand all lines: dumpling-overview.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -123,7 +123,7 @@ The above command exports all the tables in the `employees` database and the `Wo
123
123
Dumpling can also export specific databases with the `-B` option or specific tables with the `-T` option.
124
124
125
125
> **Note:**
126
-
>
126
+
>
127
127
> - The `--filter` option and the `-T` option cannot be used at the same time.
128
128
> - The `-T` option can only accept a complete form of inputs like `database-name.table-name`, and inputs with only the table name are not accepted. Example: Dumpling cannot recognize `-T WorkOrder`.
129
129
@@ -210,7 +210,7 @@ After your operation is completed, set the GC time back (the default value is `1
This document introduces the functionalities of TiDB ecosystem tools and their relationship.
9
9
10
-
## Full data export
10
+
## Full data export
11
11
12
12
[Dumpling](/dumpling-overview.md) is a tool for the logical full data export from MySQL or TiDB.
13
13
@@ -22,10 +22,11 @@ The following are the basics of Dumpling:
22
22
23
23
[TiDB Lightning](/tidb-lightning/tidb-lightning-overview.md) (Lightning) is a tool used for the full import of large amounts of data into a TiDB cluster. Currently, TiDB Lightning supports reading SQL dump exported via Dumpling or CSV data source.
24
24
25
-
TiDB Lightning supports two modes:
25
+
TiDB Lightning supports three modes:
26
26
27
-
-`importer`: This mode uses tikv-importer as the backend, which is usually for importing a large amount of data (at the TB level). During the import, the cluster cannot provide services.
28
-
-`tidb`: This mode uses TiDB/MySQL as the backend, which is slower than the `importer` mode but can be performed online. It also supports importing data to MySQL.
27
+
-`local`: TiDB Lightning parses data into ordered key-value pairs and directly imports them into TiKV. This mode is usually for importing a large amount of data (at the TB level) to a new cluster. During the import, the cluster cannot provide services.
28
+
-`importer`: This mode is similar to the `local` mode. To use this mode, you need to deploy an additional component `tikv-importer` to help import key-value pairs. If the target cluster is in v4.0 or later versions, it is recommended to use the `local` mode.
29
+
-`tidb`: This mode uses TiDB/MySQL as the backend, which is slower than the `local` mode and `importer` mode but can be performed online. It also supports importing data to MySQL.
29
30
30
31
The following are the basics of TiDB Lightning:
31
32
@@ -37,7 +38,7 @@ The following are the basics of TiDB Lightning:
37
38
38
39
> **Note:**
39
40
>
40
-
> The Loader tool is no longer maintained. For scenarios related to Loader, it is recommended that you use the `tidb` mode of TiDB Lighting instead.
41
+
> The Loader tool is no longer maintained. For scenarios related to Loader, it is recommended that you use the `tidb` mode of TiDB Lighting instead. For details, see [TiDB Lightning TiDB backends](/tidb-lightning/tidb-lightning-backends.md#migrating-from-loader-to-tidb-lightning-tidb-backend).
+ Import **large amounts** of **new** data **quickly**
12
12
+ Back up and restore all the data
13
13
14
-
The TiDB Lightning tool set consists of two components:
15
-
16
-
-**`tidb-lightning`** (the "front end") reads the data source and imports the database structure into the TiDB cluster, and also transforms the data into Key-Value (KV) pairs and sends them to `tikv-importer`.
17
-
18
-
-**`tikv-importer`** (the "back end") combines and sorts the KV pairs and then imports these sorted pairs as a whole into the TiKV cluster.
19
-
20
14

21
15
22
16
## Prerequisites
23
17
24
-
This tutorial assumes you use several new and clean CentOS 7 instances. You can use VMware, VirtualBox or other tools to deploy a virtual machine locally or a small cloud virtual machine on a vendor-supplied platform. Because TiDB Lightning consumes a large amount of computer resources, it is recommended that you allocate at least 4 GB memory for running it.
18
+
This tutorial assumes you use several new and clean CentOS 7 instances. You can use VMware, VirtualBox or other tools to deploy a virtual machine locally or a small cloud virtual machine on a vendor-supplied platform. Because TiDB Lightning consumes a large amount of computer resources, it is recommended that you allocate at least 16 GB memory and CPU of 32 cores for running it with the best performance.
25
19
26
20
> **Warning:**
27
21
>
@@ -51,69 +45,63 @@ After executing this command, the full backup data is exported to the `/data/my_
51
45
52
46
### Step 1: Deploy TiDB cluster
53
47
54
-
Before the data import, you need to deploy a TiDB cluster (later than v2.0.9). In this tutorial, TiDB v3.0.4 is used. For the deployment method, refer to [TiDB Introduction](/overview.md).
48
+
Before the data import, you need to deploy a TiDB cluster (later than v2.0.9). In this tutorial, TiDB v4.0.3 is used. For the deployment method, refer to [TiDB Introduction](/overview.md).
1. Upload `bin/tidb-lightning` and `bin/tidb-lightning-ctl` in the installation package to the server where TiDB Lightning is deployed.
100
-
2. Upload the [prepared data source](#prepare-full-backup-data) to the server.
101
-
3. After configuring the parameters properly, use a `nohup` command to start the `tidb-lightning` process. If you directly run the command in the command-line, the process might exit because of the SIGHUP signal received. Instead, it's preferable to run a bash script that contains the `nohup` command:
95
+
4. After configuring the parameters properly, use a `nohup` command to start the `tidb-lightning` process. If you directly run the command in the command-line, the process might exit because of the SIGHUP signal received. Instead, it's preferable to run a bash script that contains the `nohup` command:
After the import is completed, TiDB Lightning exits automatically. If the import is successful, you can find `tidb lightning exit` in the last line of the log file.
> Loader is no longer maintained. Its features are completely superseded by [TiDB Lightning TiDB-backend](/tidb-lightning/tidb-lightning-tidb-backend.md). It is strongly recommend to use TiDB Lightning instead.
11
+
> Loader is no longer maintained. Its features are completely superseded by [TiDB Lightning TiDB-backend](/tidb-lightning/tidb-lightning-backends.md#tidb-lightning-tidb-backend). It is strongly recommend to use TiDB Lightning instead.
Copy file name to clipboardexpand all lines: migrate-from-mysql-mydumper-files.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,9 @@ Before you start the migration, [deploy TiDB Lightning](/tidb-lightning/deploy-t
16
16
17
17
> **Note:**
18
18
>
19
-
> - If you choose the Importer-backend to import data, you need to deploy `tikv-importer` along with TiDB Lightning. During the import process, the TiDB cluster cannot provide services. This mode imports data quickly, which is suitable for importing a large amount of data (above the TB level).
20
-
> - If you choose the TiDB-backend, deploy TiDB Lightning only. The cluster can provide services normally during the import.
21
-
> - For detailed differences between the two backend mode, see [TiDB Lightning Backend](/tidb-lightning/tidb-lightning-tidb-backend.md).
19
+
> - If you choose the Local-backend to import data, the TiDB cluster cannot provide services during the import process. This mode imports data quickly, which is suitable for importing a large amount of data (above the TB level).
20
+
> - If you choose the TiDB-backend, the cluster can provide services normally during the import, at a slower import speed.
21
+
> - For detailed differences between the two backend modes, see [TiDB Lightning Backends](/tidb-lightning/tidb-lightning-backends.md).
22
22
23
23
## Step 2: Configure data source of TiDB Lightning
0 commit comments