Skip to main content

Quick Start

This article mainly introduces CloudCanal to get started quickly, taking the new deployment of CloudCanal for Docker for Linux machines as an example.

Machine Prepare

Prepare a Linux (CentOS 7/8) virtual machine

  • CPU cores: 4
  • Memory: 8 GB

Install and Activate

Add DataSource

  • Log in to the CloudCanal console,DataSource > Add DataSource. add datasource

    • Select Self Maintenance database
    • Select MySQL database type
    • Fill necessary information such as connection url, account and password, etc
    • Test Connection to verify connectivity
    • Click the Add DataSource button to complete
  • The DataSource just added datasource list

Create DataJob and Run

  • Log in to the added MySQL database.

  • Run following script to prepare the test data.

     # source database
    create database sample_src;

    # target database
    create database sample_dst;

    # prepare table and data for migration and sync
    use sample_src;
    CREATE TABLE IF NOT EXISTS `sample_src`.`test_table`(
    `id` INT UNSIGNED AUTO_INCREMENT,
    `name` VARCHAR(32) NOT NULL,
    `age` int not null ,
    PRIMARY KEY ( `id` )
    )ENGINE=InnoDB DEFAULT CHARSET=utf8;

    # prepare test data
    insert into `sample_src`.`test_table`(id,name,age) values(1,'hello',18);
    insert into `sample_src`.`test_table`(id,name,age) values(2,'world',18);
    insert into `sample_src`.`test_table`(id,name,age) values(3,',',18);
    insert into `sample_src`.`test_table`(id,name,age) values(4,'cloudcanal',18);
  • Back in the CloudCanal console,DataJob > Create DataJob.

  • Select the added DataSource as source and target.

  • Click Test Connection and click Next Step. create data job 1

  • Choose Incremental as DataJobType, select Full Data, and click Next Step. create data job 2

  • Select the tables and click Next Step. create data job 3

  • Select all columns and click Next Step. create data job 4

  • Confirm and Create DataJob. create data job 5

  • DataJob running normally. create data job 8

    • DataJob will automatically Initialize, Schema Migration, Full Data, Incremental, the progress bar changes gradually.
  • Data Verification.

    • Create several insert,update,delete in the source DataSource.
    • Find peer DataSource has consistent data.

Summary

CloudCanal can be quickly and simple used for Data Migration and Synchronization in four steps.

Include Machine prepare, Install and activate, Add DataSource, Create DataJob and run.