Migrate self-managed MySQL to ApsaraDB RDS with DTS

You will migrate a live MySQL 8.0 database from an ECS server to ApsaraDB RDS for MySQL. DTS first creates the schema, performs a full copy, and then continuously applies binary-log changes while the source keeps accepting orders.

200 - Intermediate~90 minutes Region: Philippines (Manila), ap-southeast-6DTSRDS MySQL

Scenario

The legacy shop database runs as self-managed MySQL on wsNN-source. The company wants a managed database without a long write outage. You will prepare the source, prepare wsNN-rds, configure the DTS migration task prepared for you, generate new source transactions, confirm that DTS applies them to RDS, and practice a controlled cutover.

Architecture

Philippines (Manila) | ws-vpc 10.10.0.0/16 | ws-vsw-a 10.10.1.0/24 wsNN-source (ECS) Self-managed MySQL 8.0 shopdb ROW / FULL binary logs dts_user (least DB privileges) wsNN-rds ApsaraDB RDS for MySQL 8.0 Basic Edition / cloud ESSD shopdb (created by DTS) dtsadmin (privileged account) DTS schema + full + incremental DTS reads source binary logs and writes changes to RDS until the task is ended.

What you will learn

  • Source requirements for incremental MySQL migration: primary keys, ROW binary logs, FULL row images and enough log retention.
  • The minimum MySQL privileges DTS needs on the source and why it writes a heartbeat/test database.
  • How to create an RDS privileged account and allow private access for validation.
  • How to configure source and destination connections, select objects and interpret the precheck.
  • How full and incremental phases differ, how to measure latency, and how to perform a cutover.

Modules

  • 0
    Getting started
    Sign in, select Philippines (Manila) and identify your resources.
    10 min
  • 1
    Prepare source MySQL
    Validate prerequisites and create the DTS database account.
    15 min
  • 2
    Prepare target RDS
    Create a privileged account and configure its IP whitelist.
    10 min
  • 3
    Configure the migration task
    Connect endpoints, select shopdb, precheck and start.
    25 min
  • 4
    Monitor and validate
    Generate live writes and compare source with destination.
    15 min
  • 5
    Cut over
    Stop writes, confirm DTS is Undelayed, compare final values and switch the application endpoint.
    10 min

Cost and lifecycle

DTS schema migration and full data migration are free of charge. Incremental data migration is billed while it runs. The RDS and ECS instances and their storage are billed separately. No exact price is assumed here; use the pricing calculator for your account and region.

Incremental migration does not finish by itself

After the full copy completes, the task stays Running and keeps incurring charges until it is ended. Tell your facilitator as soon as you finish Module 5.

Shared DTS console

You can see every participant's DTS tasks, but you can configure and run only your own. Work only with the task that has your DTS instance ID and the RDS instance wsNN-rds.

Using your own Alibaba Cloud account?

First complete Run the DTS workshop in your own account to create and verify the source ECS, RDS instance and DTS migration instance.

Facilitated setup Own-account setup