# Consistency of Exported Data

__*Dumpling export data consistency*__
__*Dumpling —consistency*__

+ Dumpling uses the —consistency <consistency level>flag to control how exported data is "guaranteed consistent"
  + Flush
  + Snapshot
  + Lock
  + none
  + Auto
```
./dumpling --snapshot 417773951312461825
./dumpling --snapshot "2020-07-02 17:12:45"
```

-------------------------------------------------------------

Dumpling uses the —consistency <consistency level>flag to control how the exported data is "guaranteed to be consistent". For TiDB, by default, consistency is guaranteed by taking a snapshot of a certain timestamp (i.e. —consistency snapshot). When using snapshots to ensure consistency, you can use the —snapshot option to specify the timestamp to back up. The following levels of consistency are also available:

- flush: Use FLUSH TABLES WITH READ LOCK to briefly interrupt the backup library's DML and DDL operations, to ensure the global consistency of the backup connection, and to log POS information. The lock is released after all backup connections start transaction. It is recommended to perform a full backup at a peak in business or on a MySQL backup repository.

- snapshot: Get a consistent snapshot with the specified timestamp and export it.

- lock: Read locks on all tables to be exported.

- none: No guarantee of consistency is made.

- auto: Use flush for MySQL and snapshot for TiDB.

Selected Speeches:
Dumpling can specify the data when exporting a tidb_snapshot with —snapshot.

The —snapshot option can be set to TSO (Position column in the SHOW MASTER STATUS output) or a valid datetime time, for example:
```
./dumpling --snapshot 417773951312461825
./dumpling --snapshot "2020-07-02 17:12:45"
```
You can export a snapshot of the TiDB historical data at TSO 417773951312461825 or 2020-07-02 17:12:45.