# Using `tidb-lightning-ctl`: Checkpoints Control

+ Command line tool `tidb-lightning-ctl` can be downloaded form `TiDB Toolkits Site`
[https://docs.pingcap.com/tidb/stable/download-ecosystem-tools](https://docs.pingcap.com/tidb/stable/download-ecosystem-tools)  
+ If you 
  + Cannot resolve the error in last import
  + Cannot resume the task from the last checkpoint
  + Want to start the task over again
+ Before you re-run the import task, you must use `tidb-lightning-ctl` to
  + Remove both the checkpoint and the imported tables: **`--checkpoint-error-destroy`**
  + Remove the checkpoint and keep imported tables: **`--checkpoint-remove`**
  + Ignore the checkpoint error and keep the imported tables: **`--checkpoint-error-ignore`**
+ Syntax:
```
tidb-lightning-ctl ~!@--checkpoint-error-destroy@!~='`{schema}`.`{table}`'|all

tidb-lightning-ctl ~!@--checkpoint-remove@!~='`{schema}`.`{table}`'|all

tidb-lightning-ctl ~!@--checkpoint-error-ignore@!~='`{schema}`.`{table}`'|all
```
-------------------------------------------------------------
If `tidb-lightning` exits abnormally due to unrecoverable errors (for example, data corruption), it refuses to reuse the checkpoints until the errors are resolved. This is to prevent worsening the situation. The checkpoint errors can be resolved using the `tidb-lightning-ctl` program.

`--checkpoint-error-destroy`: This option allows you to restart importing the table from scratch. The schema and table names must be quoted with backquotes and are case-sensitive.
- If importing the table `schema.table` failed previously, this option executes the following operations:
  - Drops the table `schema.table` from the target database, which means removing all imported data.
  - Resets the checkpoints record of this table to be "`not yet started`".
-If there is no errors involving the table `schema.table`, this operation does nothing.

`--checkpoint-error-ignore`: If importing the table `schema.table` failed previously, this clears the error status as if nothing ever happened. The all variant applies this operation to all tables.

`--checkpoint-remove`: This option simply removes all checkpoint information about one table or all tables, regardless of their status.

Above options support keyword `all` to match all the tables.