# Backup Techniques

+ Logical backup
  + `SQL` statements text
  + Results in a text file containing `SQL` statements to reconstruct the data in the database
+ Physical backup
  + Binary copy of the database files
+ Replication based
  + Tools like `TiCDC`, `TiDB Binlog` pulls the changes and exports incremental data to downstream databases in real-time
    + `TiDB Binlog` is not compatible with some features introduced in `TiDB v5.0`
    + It is recommended to use `TiCDC` instead of `TiDB Binlog`

---------------------------------------------------------------------------------------------------------------------------------------------------
Replication-based backups are created with the synchronous replication features. We will talk about `TiCDC` (Change Data Capture) in other training courses.

Differences between replication based techniques `TiCDC` and `TiDB Binlog`:
- `TiCDC` cluster has high availability, `TiDB Binlog` does not.
- `TiDB Binlog` is not compatible with some features introduced in `TiDB v5.0`.
- The data source of `TiCDC` is the `KV Change Log` of `TiKV` servers.
- The data source of `TiDB BinLog` is the `Binlog` of `TiDB` server.