# `TiDB Lightning`: Task Parameters for `Checkpoint` 
+ Section: **`[checkpoint]`**
+ Parameters: 
  + **`enable = true|false`**, default is **`true`**
  + **`driver = "file|mysql"`**
  + **`dsn = "{file_path}|{user_name}:{passwowrd}@tcp({host}:{port})/"`**
  + **`schema = "{database_name}"`**
  + **`keep-after-success = true|false`**, default is **`false`**
+ Description: 
  + While importing data, `TiDB Lightning` records which tables have been imported, so even if `TiDB Lightning` or another component crashes, you can start from a known good state instead of restarting from scratch. You can choose **`file`** or **`mysql`** as the persistent storage for storing the checkpoints.
+ For example:
```
[lightning]
enable = true
driver = file
dsn = "/tmp/tidb_lightning_checkpoint.pb"
```
----------------------------------------------------------------------------------------------------------------------------
Importing a large database usually takes hours or days, and if such long running processes spuriously crashes, it can be very time-wasting to redo the previously completed tasks. To solve this, `TiDB Lightning` uses checkpoints to store the import progress, so that `tidb-lightning` continues importing from where it lefts off after restarting.

Parameter `enable`: Whether to enable checkpoints. While importing data, `TiDB Lightning` records which tables have been imported, so even if `TiDB Lightning` or another component crashes, you can start from a known good state instead of restarting from scratch.

Parameter `driver`: Whether to persistent the checkpoints data to file or database.

Parameter `schema`: You can assign a schema name (database name) to store the checkpoints if `driver = "mysql"`.

Parameter `dsn`: The data source name `(dsn)` indicating the location of the checkpoint storage.
- For the `"file"` driver, the `DSN` is a path.
- For the `"mysql"` driver, the `DSN` is a `URL` in the form of `"{user_name}:{passwowrd}@tcp({host}:{port})/"`. If the `URL` is not specified, the `TiDB` server from the `[tidb]` section is used to store the checkpoints. You should specify a different `MySQL-compatible` database server to reduce the load of the target `TiDB` cluster.

Parameter `keep-after-success`: Whether to keep the checkpoints after all data are imported. If false, the checkpoints will be deleted. Keeping the checkpoints can aid debugging but will leak metadata about the data source.