You need to enable JavaScript to run this app.
RDS for MySQL

RDS for MySQL

Copy page
Download PDF
Managing disaster instances
Creating a disaster recovery synchronization link
Copy page
Download PDF
Creating a disaster recovery synchronization link
This topic describes how to create a synchronization link for a primary instance and a disaster recovery instance.​
Billing​
Database Transmission Service (DTS) provides data synchronization for primary and disaster recovery instances. For more information about the synchronization link fee, refer to Billing items for data synchronization tasks.​
Prerequisites​
A disaster recovery instance has been created for the primary instance. For more information, refer to Creating a disaster recovery instance.​
Precautions​
  • You can create a synchronization link from either the primary instance or the disaster recovery instance.​
  • Only one synchronization link can be created between a primary instance and a disaster recovery instance.​
  • Only pay-as-you-go synchronization tasks are supported.​
  • Primary instance accounts are synchronized only when the synchronization link is created. When a super account from the primary instance is synchronized to the disaster recovery instance, its privileges are retained, but it is displayed as a normal account.​
  • The data synchronization task starts automatically after the synchronization link is created and cannot be terminated or paused.​
  • During DTS synchronization, do not write data to the target database from sources other than DTS, or data inconsistency will occur between the source and target databases. For example, performing online DDL changes with DBW while data is written to the target database from sources other than DTS can cause data loss in the target database.​
  • During link creation, database and table structure initialization, and full initialization, do not perform DDL operations that change the database or table structure on the primary instance, or the synchronization task will fail.​
  • During the full synchronization phase, do not perform DDL operations on the instance, or the full synchronization will fail. If it fails, you must delete the existing disaster recovery instance and create a new one for the primary instance.​
  • When using an online DDL tool for DDL operations, ensure that the entire database is the synchronization object. Otherwise, the DDL operation will fail because temporary tables cannot be synchronized. During synchronization, do not use an online DDL tool for lightweight DDL operations, such as adding fields to small tables. Otherwise, DDL synchronization may fail if the DDL temporary tables exist for too short a period.​
  • Tables to be synchronized must have a primary key or a unique non-null constraint, and their fields must be unique. Otherwise, data inconsistency may occur.​
  • Binlogs must be retained for at least 24 hours, and a retention period of more than seven days is recommended. Otherwise, the DTS task may fail because it cannot obtain the logs, potentially leading to data loss.​
  • Tables with foreign key dependencies must be synchronized simultaneously. Otherwise, data synchronization will fail.​
  • Synchronization tasks do not support synchronizing trigger and event objects.​
  • After creating the synchronization link, modify the following parameters of the primary instance with caution to avoid impacting the synchronization link:​
  • lower_case_table_names​
  • collation_server​
  • transaction_isolation​
  • innodb_strict_mode​
  • sql_mode​
  • innodb_large_prefix​
  • default_time_zone​
  • If the SSL feature for the primary instance is enabled after a disaster recovery instance is created, use a super account or a normal account with all privileges to create the synchronization link. Otherwise, the synchronization link might fail to be created.​
  • If you create a synchronization link using a normal account and then enable the SSL feature for the primary instance, you need to modify the privileges of the normal account to global authorization on the primary instance. Otherwise, the link synchronization might fail.​
Procedure​
  1. Log on to the RDS for MySQL console.​
  1. In the upper-left corner of the top menu bar, select the project and region for the instance.​
tip​
If the project of the instance has not been set, the project should be selected as All resources.​
  1. In the left navigation bar, click Instances to view the list of RDS for MySQL instances.​
  1. On the Instances page, click the name of the target primary instance or disaster recovery instance to go to the Summary tab.​
  1. Click the Connectivity tab, and in the Instance topology section, click Create synchronization link to go to the Create disaster recovery synchronization task page.​
  1. On the Create disaster recovery synchronization task page, configure the following settings.​
  1. On the Configure source and target databases page, configure the settings and click Next: configure synchronization objects to go to the Configure synchronization objects page.​
  • ​
    Parameter​
    Description​
    Task name​
    (Optional) Customize the task name. Naming rules are as follows:​
    • Must start with a letter.​
    • Must be 64 characters or less.​
    • Can only contain letters, digits, underscores (_), and hyphens (-).​
    Link specification​
    Select the link specification for the synchronization task. Compact and Standard are supported.​
    tip​
    The link specification cannot be modified after the task is successfully created. For details about the link specification, refer to Product specification.​
    Synchronization topology​
    Select a synchronization topology based on your business needs. Only unidirectional synchronization is currently supported.​
    Database account​
    Enter the database account of the target instance.​
    Database password​
    Enter the password corresponding to the database account of the target instance.​
    Test connection​
    Click Test connection to verify the connection to the instance. If the test connection fails, modify the configuration based on the failure prompt, and then click Test connection again to verify the connection. The specific prompts are as follows:​
    • Connection authentication failed. Check if the username and password are correct: when this error prompt appears, verify your username and password.​
    • Connection authentication failed. A connection cannot be created. Contact customer service: When this error prompt appears, submit a ticket to contact technical support.​
    Project​
    (Optional) Select the affiliated project for the task from the drop-down list. By default, it is under default (default project). You can also click Create new project to create a new project. For more details, refer to Resource Management.​
    tip​
    • For instructions on how to grant a user permission to access resources in a specified project, refer to Modify project permissions.​
    • After a task is created successfully, if you need to change its affiliated project, you can move the resource to another project.​
    • A project is a virtual concept that includes a set of resources, users, and roles. A project allows you to view and manage a group of resources in a unified manner and control the permissions of users and roles to these resources.​
    Tag​
    (Optional) Click Add tag to add a tag to the instance. Tags can help you categorize cloud resources, control access to them, and allocate bills and costs. A tag is a key-value pair that identifies a cloud resource. You can use tags to categorize resources with the same characteristics from different dimensions, such as purpose or owner, making it easier to filter, aggregate, and manage your cloud resources. For more details about tags, refer to Tag overview. The rules for tag key-value pairs are as follows:​
    • Key​
    • Supports any language, characters, numbers, spaces, or symbols (_.:/=+-@).​
    • Case-sensitive, and the length is 1–128 characters.​
    • In UTF-8 encoded Unicode format.​
    • Keys cannot start with any form of volc:, such as Volc: or VOLC:.​
    • (Optional) value​
    • Supports any language, character, digit, space, or symbol (_.:/=+-@).​
    • Case-sensitive, and the length is 0–256 characters.​
    • In UTF-8 encoded Unicode format.​
    tip​
    • A maximum of 20 tags can be associated with a task in a single operation. A maximum of 50 tags can be associated with a single task.​
    • For a single resource, tag keys must be unique, and each tag key can have only one Value.​
    Billing method​
    Select the billing method as required. Currently, only the Pay-as-you-go billing method is supported.​
    ​
  1. On the Configure synchronization objects page, configure the settings and click Pre-check to initiate the pre-check and go to the Pre-check page.​
  • ​
    Parameter​
    Description​
    Synchronization type​
    Select the synchronization type as needed. Four synchronization types are selected by default: User initialization, Schema initialization, Full initialization, and Incremental synchronization.​
    Migration user​
    Select the target accounts as needed, and set a new password in the New password (Optional) column. When migrating multiple users, click Bulk modify passwords to change all their passwords at once. Otherwise, the target account passwords will be the same as the source passwords.​
    tip​
    • This configuration is supported when Synchronization type is set to User initialization.​
    • During database synchronization, the synchronization of users and privileges needs to be handled separately. If some accounts in the source database do not support synchronization, firstly, ensure that your business operations are not affected by the absence of these accounts.​
    Synchronization object​
    Select the object to be synchronized. Only the entire instance can be selected as the synchronization object.​
    Error retry time​
    If a synchronization task fails due to a disconnection between the source and target databases, the system immediately retries connecting to them multiple times within the specified time. Value range: 600–86400, in seconds (s). The default value is 600 seconds.​
    Full synchronization rate​
    Set the full synchronization rate as needed. To prevent a high synchronization rate from impacting the source database performance, adjust the following parameters based on the read/write pressure on the source and target databases:​
    • Rows synchronized per second: Enable and set this value as needed. The default value is 100000, and the value range is 1-100000.​
    • Data volume to synchronize per second: Enable this option and set the data volume as needed. The default value is 25000, the value range is 1-25000, and the unit is KB.​
    ​
  1. After the pre-check is complete, the Pre-check page displays the check result for each check item. If the pre-check passes, click Confirm order to create the disaster recovery synchronization task.​
tip​
For details about the pre-check, refer to Pre-check item.​
Related document​
For more details on creating a data synchronization task, refer to Synchronizing data from RDS for MySQL to RDS for MySQL.​
​
Last updated: 2026.04.01 16:39:45