ApeCloud's Data Transfer Suite, written in Rust. Provides ultra-fast data replication between MySQL, PostgreSQL, Redis, MongoDB, Kafka and ClickHouse, ideal for disaster recovery (DR) and migration scenarios.
English | δΈζ
Introduction
- ape-dts is a data migration tool enabling any-to-any data transfers.
- It also provides data subscription and data processing.
- It is lightweight, efficient and standalone, requiring no third-party components or extra storage.
- Designed for cloud-native stateless component scenarios.
- In Rust.
Key features
- Supports data migration between various databases, both homogeneous and heterogeneous.
- Supports snapshot and cdc tasks with resume from breakpoint.
- Supports checking and revising data.
- Supports filtering and routing at the database, table, and column levels.
- Implements different parallel algorithms for different sources, targets, and task types to improve performance.
- Allows loading user-defined Lua scripts to modify the data.
Supported task types
| | mysql -> mysql | pg -> pg | mongo -> mongo | redis -> redis | mysql -> kafka | pg -> kafka | mysql -> starrocks | mysql -> clickhouse | mysql -> tidb | pg -> starrocks | pg -> clickhouse | mysql -> doris | pg -> doris | | :----------------------- | :------------- | :------- | :------------- | :------------- | :------------- | :---------- | :----------------- | :------------------ | :------------ | :-------------- | :--------------- | :------------- | :---------- | | Snapshot | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | CDC | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | Data check/revise/review | ✔ | ✔ | ✔ | | | | | | ✔ | | | | | | Structure migration | ✔ | ✔ | | | | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Advanced
Crate features
The dt-main crate provides several optional components which can be enabled via Cargo [features]:
metrics: Enable Prometheus format task metrics HTTP service interface.
[metrics]
# http service host
http_host=127.0.0.1
# http service port
http_port=9090
# http service worker count
workers=2
# prometheus metrics const labels
labels=yourlabel1:yourvalue1,yourlabel2:yourvalue2
- TBD
Quick starts
CLI
dtscli is a lightweight local CLI for creating and managing ApeCloud DTS tasks. It can generate task configs, start dt-main, list tasks, stream logs, and stop, restart, or delete local task records.

For installation and detailed usage, see dt-cli/README.md.
Tutorial
- prerequisites
- mysql -> mysql
- pg -> pg
- mongo -> mongo
- redis -> redis
- mysql -> starrocks
- mysql -> doris
- mysql -> clickhouse
- mysql -> tidb
- mysql -> kafka -> consumer
- pg -> starrocks
- pg -> doris
- pg -> clickhouse
- pg -> kafka -> consumer
- snapshot + cdc without data loss
- modify data by lua
Run tests
Refer to test docs for details.
More docs
- Configurations
- Structure tasks
- Snapshot tasks
- CDC tasks
- Custom consumers
- Data processing
- Monitor
- Task templates
Benchmark
- MySQL -> MySQL, Snapshot
- MySQL -> MySQL, CDC
- Image size
- more benchmark details
Contributing
Structure

Modules
- dt-main: program entry
- dt-precheck: pre-check, to minimize interruptions during subsequent data operations by identifying issues early for fast failure
- dt-connector: extractors + sinkers for databases
- dt-pipeline: pipeline to connect extractors and sinkers
- dt-parallelizer: parallel algorithms
- dt-task: create extractors + sinkers + pipelines + parallelizers according to configurations
- dt-common: common utils, basic data structures, metadata management
- dt-tests: integration tests
- related sub module: mysql binlog connector in rust
Build
- Minimum supported Rust version (MSRV)
- cargo build
- build images
Checklist
- run
cargo clippy --all-targets --all-features --workspacefix all clippy issues.
Community
If you have any questions, you can reach out to us through:
- ApeDTS GitHub Discussions
- ApeDTS Wechat Account with note ape-dts:
