Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Real-Time Synchronization

Updated on 2022-08-16 GMT+08:00

Real-time synchronization refers to the real-time flow of key service data from sources to destinations while consistency of data can be ensured. It is different from migration. Migration means moving your overall database from one platform to another. Synchronization refers to the continuous flow of data between different services.

Supported Database Types

DRS supports real-time synchronization between databases of various types, and many-to-one synchronization.

Table 1 Database types

Synchronization Direction

Data Flow

Source DB

Destination DB

Destination DB Type

To the cloud

MySQL->MySQL

  • On-premises databases
  • Databases on an ECS
  • Databases on other clouds
  • RDS MySQL DB instances

RDS MySQL DB instances

  • Single DB instance
  • Primary/Standby DB instance

To the cloud

PostgreSQL->PostgreSQL

  • On-premises databases
  • Databases on an ECS
  • Databases on other clouds
  • RDS PostgreSQL DB instances

RDS PostgreSQL DB instances

  • Single DB instance
  • Primary/Standby DB instance

To the cloud

DDM->MySQL

DDM

RDS MySQL DB instances

  • Single DB instance
  • Primary/Standby DB instance

From the cloud

MySQL->MySQL

RDS MySQL DB instances

  • On-premises databases
  • Databases on an ECS
  • Databases on other clouds
  • RDS MySQL DB instances

-

From the cloud

DDM->MySQL

DDM

  • On-premises databases
  • Databases on an ECS
  • Single DB instance
  • Primary/Standby DB instance

Synchronization Methods

DRS supports three synchronization modes: full synchronization, incremental synchronization, and full+incremental synchronization.

Full synchronization: All objects and data in non-system databases are synchronized to the destination database at a time. This mode is applicable to scenarios where service interruption is acceptable.

Incremental synchronization: Through log parsing, DRS replicates incremental data to keep sources and destinations in sync.

Full+Incremental synchronization: DRS allows you to synchronize data in real time. After a full synchronization initializes the destination database, an incremental synchronization parses logs to ensure data consistency between the source and destination databases.

Table 2 Synchronization methods

Synchronization Direction

Data Flow

Incremental

Full

Full+Incremental

One-way/Two-way Sync

To the cloud

MySQL->MySQL

Supported

Not supported

Supported

One-way sync

To the cloud

PostgreSQL->PostgreSQL

Supported

Supported

Supported

One-way sync

To the cloud

DDM->MySQL

Not supported

Not supported

Supported

One-way sync

From the cloud

MySQL->MySQL

Supported

Not supported

Supported

One-way sync

From the cloud

DDM->MySQL

Not supported

Not supported

Supported

One-way sync

Database Versions

NOTE:

Data cannot be synchronized from a newer version database to an older version database.

Table 3 Database versions

Synchronization Direction

Data Flow

Source Database Version

Destination DB Version

To the cloud

MySQL->MySQL

  • MySQL 5.5.x
  • MySQL 5.6.x
  • MySQL 5.7.x
  • MySQL 8.0.x
  • MySQL 5.6.x
  • MySQL 5.7.x
  • MySQL 8.0.x

To the cloud

PostgreSQL->PostgreSQL

  • PostgreSQL 9.4.x
  • PostgreSQL 9.5.x
  • PostgreSQL 9.6.x
  • PostgreSQL 10.x
  • PostgreSQL 11.x
  • PostgreSQL 12.x
  • PostgreSQL Enhanced Edition
  • PostgreSQL 13.x
    NOTE:

    If the source DB type is RDS PostgreSQL Enhanced Edition, the destination DB type must be the same.

  • PostgreSQL 9.5.x
  • PostgreSQL 9.6.x
  • PostgreSQL 10.x
  • PostgreSQL 11.x
  • PostgreSQL 12.x
  • PostgreSQL Enhanced Edition
  • PostgreSQL 13.x

To the cloud

DDM->MySQL

Based on the live network

  • MySQL 5.6.x
  • MySQL 5.7.x

From the cloud

MySQL->MySQL

  • MySQL 5.6.x
  • MySQL 5.7.x
  • MySQL 8.0.x
  • MySQL 5.6.x
  • MySQL 5.7.x
  • MySQL 8.0.x

From the cloud

DDM->MySQL

Based on the live network

  • MySQL 5.6.x
  • MySQL 5.7.x

Network Types

DRS supports real-time synchronization through a Virtual Private Cloud (VPC), Virtual Private Network (VPN), Direct Connect, or public network. Table 4 lists the application scenarios of each network type and required preparations.

Table 4 Network types

Network Type

Application Scenario

Preparations

VPC

Synchronization between cloud databases

  • The source and destination databases must be in the same region.
  • The source and destination databases can be in either the same VPC or in different VPCs.
  • If source and destination databases are in the same VPC, they can communicate with each other by default. Therefore, you do not need to configure a security group.
  • If the source and destination databases are not in the same VPC, the CIDR blocks of the source and destination databases cannot overlap each other, and the source and destination databases are connected through a VPC peering connection.
  • The subnet CIDR blocks of the source and destination databases cannot be the same or overlap.

VPN

Synchronization from on-premises databases to cloud databases or between cloud databases across regions

Establish a VPN connection between your local data center and the VPC that hosts the destination database. Before synchronization, ensure that the VPN network is accessible.

Direct Connect

Synchronization from on-premises databases to cloud databases or between cloud databases across regions

Use a dedicated network connection to connect your data center to VPCs.

Public network

Synchronization from on-premises or external cloud databases to the destination databases.

To ensure network connectivity between the source and destination databases, perform the following operations:

  1. Enable public accessibility.

    Enable public accessibility for the source database based on your service requirements.

  2. Configure security group rules.
    • Add the EIPs of the synchronization instance to the whitelist of the source database for inbound traffic.
    • If destination databases and the synchronization instance are in the same VPC, they can communicate with each other by default. Therefore, you do not need to configure a security group.
    NOTE:
    • The IP address on the Configure Source and Destination Databases page is the EIP of the synchronization instance.
    • If SSL is not enabled, ensure that the data to be synchronized is non-confidential before synchronization.
Table 5 Supported network types

Synchronization Direction

Data Flow

VPC

Public Network

VPN or Direct Connect

To the cloud

MySQL->MySQL

Supported

Supported

Supported

To the cloud

PostgreSQL->PostgreSQL

Supported

Supported

Supported

To the cloud

DDM->MySQL

Supported

Supported

Supported

From the cloud

MySQL->MySQL

Supported

Supported

Supported

From the cloud

DDM->MySQL

Supported

Supported

Supported

Supported Synchronization Objects

DRS allows you to synchronize different objects. The following table lists the supported objects.

Table 6 Supported synchronization objects

Synchronization Direction

Data Flow

Table-level

Database-level

Importing an Object File

To the cloud

MySQL->MySQL

Supported

Supported

Supported

To the cloud

PostgreSQL->PostgreSQL

Supported

Supported

Supported

To the cloud

DDM->MySQL

Supported

Not supported

Not supported

From the cloud

MySQL->MySQL

Supported

Supported

Not supported

From the cloud

DDM->MySQL

Supported

Not supported

Not supported

Advanced Features

DRS supports multiple features to ensure successful data synchronization.

Table 7 Advanced features

Feature

Description

Synchronization level

DRS supports database- and table-level synchronization.

  • Database-level synchronization refers to a type of synchronization method using database as a unit. You do not need to select tables to be synchronized. New tables in the database are automatically added to the synchronization task.
  • Table-level synchronization uses table as a unit, indicating that you need to add new tables to the synchronization task manually.

Mapping object names

Allows the names of synchronization objects (including databases, schemas, tables, and columns) in the source database to be different from those in the destination database. If the synchronization objects in source and destination databases have different names, you can map the source object name to the destination one.

The following objects can be mapped: databases, schemas and tables.

Dynamically adding or deleting synchronization objects

During data synchronization, you can add or delete synchronization objects as required.

Conflict policy

DRS uses primary key or unique key conflict policies to ensure that tables with primary key or unique constraints in the source database can be synchronized to the destination database as expected.

The following conflict policies are supported:

  • Ignore

    The system will skip the conflicting data and continue the subsequent synchronization process.

  • Overwrite

    Conflicting data will be overwritten.

  • Report error

    The synchronization task will be stopped and fail.

Ignore and overwrite: Synchronization stability is prioritized, so tasks will not be interrupted as data conflicts occur.

Report error: Data quality is prioritized. Any data conflicts are not allowed, so once a conflict occurs, the synchronization task fails and an error is reported. You need to manually find the cause of the fault. If the task is in the failed state for a long time, the storage space may be used up and the task cannot be restored.

Structure synchronization

DRS does not provide data structure synchronization as an independent function during real-time synchronization. Instead, it directly synchronizes data and structures to the destination database.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback