Quick Start
1. Open the binlog configuration for the source and target clustersβ
Configure the following information in the fe.conf and be.conf of both the source and target clusters:
enable_feature_binlog=true
2. Deploy Syncerβ
2.1. Download the latest package from the following link:
https://apache-doris-releases.oss-accelerate.aliyuncs.com/ccr-syncer-2.1.4-x64.tar.xz
2.2. Start and stop Syncer
# Start
cd bin && sh start_syncer.sh --daemon
# Stop
sh stop_syncer.sh
Step 3. Open the Binlog for the synchronized database/table in the source clusterβ
-- If synchronizing the entire database, execute the following script to enable binlog for all tables in that database
./enable_db_binlog.sh --host $host --port $port --user $user --password $password --db $db
-- If synchronizing a single table, only enable the binlog for that table by executing:
ALTER TABLE your_table_name ENABLE BINLOG SET ("binlog.enable" = "true");
Step 4. Initiate a synchronization job to Syncerβ
curl -X POST -H "Content-Type: application/json" -d '{
"name": "ccr_test",
"src": {
"host": "localhost",
"port": "9030",
"thrift_port": "9020",
"user": "root",
"password": "",
"database": "your_db_name",
"table": "your_table_name"
},
"dest": {
"host": "localhost",
"port": "9030",
"thrift_port": "9020",
"user": "root",
"password": "",
"database": "your_db_name",
"table": "your_table_name"
}
}' http://127.0.0.1:9190/create_ccr
Explanation of the parameters for the synchronization job:
name: The name of the CCR synchronization job, must be unique
host, port: Correspond to the host and MySQL (JDBC) port of the cluster Master FE
user, password: The identity used by Syncer to start transactions and pull data
database, table:
If synchronizing at the database level, fill in your_db_name, and leave your_table_name empty
If synchronizing at the table level, fill in both your_db_name and your_table_name
The name used to initiate the synchronization job can only be used once