# rds-migration

Part of **RDS**

# ApsaraDB RDS Data Migration Console Guide

## Operations Overview

| Operation | Console Entry | Prerequisites | Description |
|------|-----------|---------|------|
| Migrate Data | Console > RDS > Data Migration | Source and target databases accessible; network connectivity established; required permissions configured | Create and configure a general data migration task between databases |
| Migrate Between Instances | Console > ApsaraDB RDS > Instances > Data Migration | Existing RDS instances; network connectivity; appropriate permissions | Transfer data between two ApsaraDB RDS instances, including cross-engine migrations |
| Migrate From Self-Managed | DTS > Data Migration | Self-managed database accessible; binary logging enabled (if incremental); IP whitelist configured | Use DTS to migrate data from a self-managed MariaDB/Oracle/Db2 database to RDS |
| Migrate Database to RDS PostgreSQL | Console > Database > ApsaraDB RDS > Instances > Create Instance | Source database accessible; sufficient storage in target; network connectivity | Create a new RDS PostgreSQL instance and prepare it for migration |
| Oracle to MySQL Migration | Console > Data + AI > DTS (DTS) > Data Migration | Oracle in ARCHIVELOG mode; supplemental logging enabled; RDS MySQL instance created | Migrate data from a self-managed Oracle database to RDS for MySQL using DTS |
| Db2 to MySQL Migration | Console > Data Transmission Service (DTS) > Create Migration Task | Db2 version 9.7–11.5; public IP access or VPC connectivity; sufficient RDS storage | Migrate from self-managed Db2 to RDS for MySQL with schema, full, and incremental migration |

## Operations Steps

### Migrate Data

**Navigation**: Console > RDS > Data Migration

**Prerequisites**:
- Source and target databases must be accessible from the network where the migration task is executed
- Network connectivity between source and target databases must be established
- Required permissions for accessing both source and target databases

1. Navigate to the Data Migration page in the ApsaraDB RDS console
   - Element: **Data Migration** (menu) — left navigation panel

2. Click the Create Migration Task button to start a new migration
   - Element: **Create Migration Task** (button) — top-right corner

3. Select the source database type and enter connection details
   - Element: **Source Database Type** (dropdown) — main content area
   - Notes: Supported types include MySQL, PostgreSQL, SQL Server, and Oracle

4. Enter the endpoint, port, username, and password for the source database
   - Element: **Endpoint** (text_input) — form fields section
   - Notes: Ensure the credentials have sufficient privileges for read access

5. Select the target RDS instance and configure migration options
   - Element: **Target Instance** (dropdown) — main content area
   - Notes: The target instance must be in the same region as the migration task

6. Review the migration settings and click Confirm to start the task
   - Element: **Confirm** (button) — bottom of the form
   - Notes: Migration tasks may take minutes to hours depending on data size

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Source Database Type | dropdown | Yes | MySQL, PostgreSQL, SQL Server, Oracle | Specifies the type of the source database system |
| Endpoint | text_input | Yes | — | The network address of the source database |
| Port | number_input | Yes | — | The port number used by the source database (default: 3306) |
| Username | text_input | Yes | — | The database user with read access to the source |
| Password | text_input | Yes | — | The password for the source database user |
| Target Instance | dropdown | Yes | — | The ApsaraDB RDS instance to which data will be migrated |
| Migration Type | radio | Yes | Full Migration, Incremental Migration, Full + Incremental Migration | Determines whether only existing data is transferred or also ongoing changes |

### Migrate Between Instances

**Navigation**: Console > ApsaraDB RDS > Instances > Data Migration

**Prerequisites**:
- An existing ApsaraDB RDS instance
- Network connectivity between source and target databases
- Appropriate permissions to perform migration tasks

1. Navigate to the Data Migration page in the ApsaraDB RDS console
   - Element: **Data Migration** (link) — left navigation panel

2. Click the Create Migration Task button
   - Element: **Create Migration Task** (button) — top-right corner
   - Notes: Ensure the source and target instances are in the same region for optimal performance.

3. Select the source database and target database from the dropdown menus
   - Element: **Source Database** (dropdown) — main content area
   - Notes: The source database must be accessible and have the necessary privileges.

4. Configure migration options such as full migration or incremental sync
   - Element: **Migration Type** (radio) — main content area
   - Notes: Full migration copies all data; incremental sync captures changes after initial transfer.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Source Database | dropdown | Yes | RDS MySQL 5.7, RDS PostgreSQL 12, RDS SQL Server 2019 | Select the database instance that contains the data to be migrated |
| Target Database | dropdown | Yes | RDS MySQL 8.0, RDS PostgreSQL 14, RDS SQL Server 2022 | Select the destination database instance where data will be transferred |
| Migration Type | radio | Yes | Full Migration, Incremental Sync | Choose whether to migrate all data at once or continuously sync changes |

### Migrate From Self-Managed

**Navigation**: DTS > Data Migration

**Prerequisites**:
- An ApsaraDB RDS for MariaDB instance
- Available storage space on the destination instance exceeding the total data size of the source database
- Sufficient outbound bandwidth on the source server
- Binary logging enabled on the source database
- binlog_row_image set to full
- Data logs retained for at least 7 days

1. Log on to the Data Management (DMS) console and navigate to the Data Migration page of the new DTS console
   - Element: **Data Management (DMS) console** (link) — top navigation bar

2. Hover over DTS in the top navigation bar and select DTS (DTS) > Data Migration
   - Element: **DTS** (menu) — top navigation bar

3. Select the region where your data migration instance resides from the drop-down list
   - Element: **Data Migration Tasks** (dropdown) — right side of the page
   - Notes: In the new DTS console, select the region in the upper-left corner.

4. Click Create Task in the Create Task wizard
   - Element: **Create Task** (button) — main content area

5. Configure source and destination database parameters including instance IDs, port numbers, accounts, and passwords
   - Element: **Source Database** (text_input) — main content area

6. Test connectivity and add DTS server CIDR blocks to the IP address whitelist if required
   - Element: **Test Connectivity and Proceed** (button) — bottom of the page
   - Notes: Adding DTS server CIDR blocks introduces security risks. Consider using Express Connect, VPN Gateway, or Smart Access Gateway as alternatives.

7. Select migration types: Schema Migration, Full Data Migration, and Incremental Data Migration
   - Element: **Migration Types** (checkbox) — main content area

8. Configure advanced settings such as throttling, retry times, monitoring, and ETL
   - Element: **Next: Advanced Settings** (button) — main content area

9. Run the precheck and resolve any failures or confirm alerts before proceeding
   - Element: **Next: Save Task Settings and Precheck** (button) — main content area
   - Notes: Hover over the button and click Preview OpenAPI parameters to see API parameters for this task configuration.

10. Purchase the migration instance by selecting an instance class and resource group
    - Element: **Next: Purchase Instance** (button) — main content area

11. Agree to the service terms and click Buy and Start to initiate the migration task
    - Element: **Buy and Start** (button) — confirmation dialog

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Task Name | text_input | No | — | A descriptive name for the task. Unique names are not required. |
| Select an existing DMS database instance | dropdown | No | — | Select an existing instance to auto-populate parameters, or leave blank and configure manually. |
| Database Type | dropdown | Yes | MariaDB | — |
| Access Method | dropdown | Yes | Self-managed Database on ECS, Alibaba Cloud Instance | — |
| Instance Region | dropdown | Yes | — | The region where the source or destination database resides. |
| ECS Instance ID | text_input | Yes | — | The ID of the ECS instance hosting the source database. |
| Port Number | number_input | Yes | — | The service port of the source database (default: 3306). |
| Database Account | text_input | Yes | — | The account for the source database. See Permissions required section. |
| Database Password | text_input | Yes | — | The password for the source database account. |
| Encryption | dropdown | Yes | Non-encrypted | — |
| RDS Instance ID | text_input | Yes | — | The ID of the destination ApsaraDB RDS for MariaDB instance. |
| Processing Mode of Conflicting Tables | radio | Yes | Precheck and Report Errors, Ignore Errors and Proceed | Controls behavior when source and destination share table names. |
| Method to Migrate Triggers in Source Database | dropdown | No | — | Select the trigger migration method based on requirements. Only available when both Schema Migration and Incremental Data Migration are selected. |
| Capitalization of Object Names in Destination Instance | dropdown | No | DTS default policy | Controls the capitalization of database, table, and column names in the destination. |
| Source Objects | checkbox | No | — | Select objects from the Source Objects list to move to Selected Objects. |
| Selected Objects | checkbox | No | — | Right-click to rename objects or add WHERE conditions for row filtering. |
| Dedicated Cluster for Task Scheduling | checkbox | No | — | By default, DTS schedules the task to a shared cluster. Purchase a dedicated cluster for higher stability. |
| Monitoring and Alerting | checkbox | No | Yes | Configure alerts to notify contacts when the task fails or migration latency exceeds a threshold. |
| Retry Time for Failed Connections | number_input | No | — | Duration DTS retries a failed connection before marking the task as failed. Range: 10–1440 minutes (default: 720). |
| Retry Time for Other Issues | number_input | No | — | Duration DTS retries failed DDL or DML operations. Range: 1–1440 minutes (default: 10). |
| Enable Throttling for Full Data Migration | checkbox | No | — | Limit the read/write rate during full data migration to reduce load on source and destination servers. |
| Enable Throttling for Incremental Data Migration | checkbox | No | — | Limit the replication rate during incremental migration. |
| Environment Tag | text_input | No | — | Tag to identify the DTS instance. Optional. |
| Configure ETL | checkbox | No | Yes | Enable extract, transform, and load (ETL) to transform data during migration. |
| Resource Group | dropdown | No | default resource group | The resource group for the migration instance. |
| Instance Class | dropdown | Yes | — | The instance class determines migration speed. Select based on requirements. |

### Oracle to MySQL Migration

**Navigation**: Console > Data + AI > DTS (DTS) > Data Migration

**Prerequisites**:
- A self-managed Oracle database running in ARCHIVELOG mode with accessible archived log files
- Supplemental logging enabled on the source Oracle database with SUPPLEMENTAL_LOG_DATA_PK and SUPPLEMENTAL_LOG_DATA_UI set to Yes
- An ApsaraDB RDS for MySQL instance created
- Database account with required permissions on both source and destination databases

1. Log on to the DTS console
   - Element: **DTS console** (link) — top navigation bar

2. Click Data Migration in the left-side navigation pane
   - Element: **Data Migration** (menu) — left navigation panel

3. Select the region where the migration instance resides
   - Element: **Region dropdown** (dropdown) — upper-left corner

4. Click Create Task to open the task configuration page
   - Element: **Create Task** (button) — top-right corner

5. Configure source database parameters including Access Method, Hostname or IP address, Port Number, Oracle Type, Account, and Password
   - Element: **Source database** (text_input) — main content area

6. Configure destination database parameters including Access Method, Region, RDS Instance ID, Account, and Password
   - Element: **Destination database** (text_input) — main content area

7. Test connectivity by clicking Test Connectivity and Proceed
   - Element: **Test Connectivity and Proceed** (button) — bottom of the page
   - Notes: Make sure DTS server CIDR blocks are added to security settings of source and destination databases

8. Set migration types: Schema Migration, Full Data Migration, and Incremental Data Migration
   - Element: **Migration Types** (checkbox) — Configure Objects page
   - Notes: Select all three for service continuity during migration

9. Configure advanced settings such as retry times, throttling, and monitoring
   - Element: **Advanced Settings** (tab) — main content area

10. Save task settings and run precheck
    - Element: **Next: Save Task Settings and Precheck** (button) — bottom of the page
    - Notes: Task starts only after passing precheck; fix any failures before proceeding

11. Purchase the instance by selecting instance class and buying
    - Element: **Buy and Start** (button) — Purchase Instance page

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Task Name | text_input | No | — | A descriptive name for the DTS task. Does not need to be unique. |
| Source Database Type | dropdown | Yes | Oracle | Select Oracle as the source database type. |
| Access Method | dropdown | Yes | Public IP Address, Alibaba Cloud Instance | The access method for the source database. Use Public IP Address for external connections. |
| Hostname or IP address | text_input | Yes | — | The endpoint for connecting to the source Oracle database. |
| Port Number | number_input | Yes | — | The service port of the source Oracle database (default: 1521). |
| Oracle Type | dropdown | Yes | Non-RAC Instance, RAC or PDB Instance | The architecture of the source Oracle database. Select Non-RAC Instance for SID-based connection. |
| Account | text_input | Yes | — | The account for the source Oracle database. See preparations section for required permissions. |
| Password | text_input | Yes | — | The password for the database account. |
| Destination Database Type | dropdown | Yes | MySQL | Select MySQL as the destination database type. |
| Access Method | dropdown | Yes | Alibaba Cloud Instance | Select Alibaba Cloud Instance for connecting to the destination ApsaraDB RDS for MySQL instance. |
| Region | dropdown | Yes | — | The region where the destination ApsaraDB RDS for MySQL instance resides. |
| RDS Instance ID | text_input | Yes | — | The ID of the destination ApsaraDB RDS for MySQL instance. |
| Account | text_input | Yes | — | The account for the destination RDS instance. See preparations section for required permissions. |
| Password | text_input | Yes | — | The password for the database account. |
| SSL Encryption | dropdown | No | Non-encrypted, SSL-encrypted | Select encryption method for secure connection to the destination database. |
| Retry Time for Failed Connections | number_input | No | — | How long DTS retries after a connection failure (10–1,440 min; default: 720). |
| Retry Time for Other Issues | number_input | No | — | How long DTS retries after DDL/DML failures (must be < connection retry time; default: 10). |
| Enable Throttling for Full Data Migration | checkbox | No | — | Limits read/write load during full migration. Available only when Full Data Migration is selected. |
| Enable Throttling for Incremental Data Migration | checkbox | No | — | Limits load during incremental migration. Available only when Incremental Data Migration is selected. |
| Environment Tag | text_input | No | — | A tag to identify the DTS instance. Optional. |
| Actual Write Code | dropdown | No | — | The encoding format for writing data to the destination database. |
| Configure ETL | dropdown | No | Yes, No | Whether to enable extract, transform, and load (ETL). Select Yes to enter data processing statements. |
| Monitoring and Alerting | dropdown | No | Yes, No | Whether to configure alerting. Select Yes to set alert thresholds and notification contacts. |

### Db2 to MySQL Migration

**Navigation**: Console > Data Transmission Service (DTS) > Create Migration Task

**Prerequisites**:
- Source Db2 database version between 9.7 and 11.5
- Destination ApsaraDB RDS for MySQL instance has sufficient storage space
- Db2 database must have public IP access if using public connectivity
- SSL encryption enabled on RDS instance if SSL connection is selected

1. Click Create Migration Task
   - Element: **Create Migration Task** (button) — top-right corner of DTS console

2. Configure source and destination databases
   - Element: **Source Database** (section) — main content area
   - Notes: Select 'User-Created Database with Public IP Address' as Instance Type; enter public IP/hostname, port (default 50000), database name, account, and password.

3. Set the instance region and select the RDS instance ID
   - Element: **Instance Region** (dropdown) — left navigation panel
   - Notes: If Instance Type is set to 'User-Created Database', Instance Region is not required.

4. Enter destination database credentials
   - Element: **Database Account** (text_input) — Destination Database section
   - Notes: Ensure the account has read and write permissions on the target RDS instance.

5. Choose connection method (No SSL or SSL)
   - Element: **Connection Method** (dropdown) — Destination Database section
   - Notes: SSL option requires prior SSL encryption setup on RDS instance.

6. Click Set Whitelist and Next
   - Element: **Set Whitelist and Next** (button) — bottom of the page
   - Notes: DTS automatically adds its IP addresses to the RDS instance whitelist.

7. Select migration types and objects
   - Element: **Migration Types** (checkbox) — middle of the page
   - Notes: For zero-downtime migration, select Full Data Migration and Incremental Data Migration. Use object name mapping if renaming tables/columns.

8. Review and start the migration task
   - Element: **Start Migration** (button) — bottom of the page
   - Notes: Monitor task status in the DTS console.

9. Switch business applications to the destination instance
   - Element: **Switch to Destination Instance** (button) — final step
   - Notes: Only after confirming successful migration and stopping the task.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Task Name | text_input | No | — | Descriptive name for easy identification of the migration task. Not required to be unique. |
| Instance Type | dropdown | Yes | User-Created Database with Public IP Address, User-Created Database with Private IP Address, ApsaraDB RDS for MySQL Instance | Specifies how the source database is deployed. |
| Instance Region | dropdown | No | — | Region where the source database is located. Only required if Instance Type is not 'User-Created Database'. |
| Database Type | dropdown | Yes | Db2 | Select the type of source database. |
| Hostname or IP Address | text_input | Yes | — | Public IP address or hostname of the source Db2 database. |
| Port | text_input | Yes | — | Service port of the Db2 database (default: 50000). |
| Database Name | text_input | Yes | — | Name of the database to be migrated. |
| Database Account | text_input | Yes | — | Username for the source Db2 database account. |
| Database Password | text_input | Yes | — | Password for the Db2 database account. |
| RDS Instance ID | dropdown | Yes | — | ID of the destination ApsaraDB RDS for MySQL instance. |
| Connection Method | radio | Yes | No SSL, SSL | Method used to connect to the destination RDS instance. |
| Retry duration for failed connections | number_input | No | — | Duration DTS attempts to reconnect after a connection failure (default: 12 hours). |

## FAQ

Q: Where do I find the Data Migration feature in the ApsaraDB RDS console?
A: Navigate to Console > RDS > Data Migration. For cross-account or complex migrations, use the standalone DTS console at https://dts.alibabacloud.com/.

Q: What happens if I leave the Migration Type field empty?
A: The Migration Type field is required. You must select one of: Full Migration, Incremental Migration, or Full + Incremental Migration. The system will not allow you to proceed without a selection.

Q: Can I modify migration settings after the task has started?
A: Most configuration options (e.g., source/target endpoints, object selection) cannot be changed after the task starts. However, you can adjust throttling, retry times, and monitoring settings in some cases via the task details page.

Q: What permissions do I need on the source and target databases?
A: For full migration, the source account needs SELECT privileges. For incremental migration, additional privileges are required (e.g., REPLICATION CLIENT/SERVER for MySQL, or specific roles for Oracle/Db2). The target account needs CREATE, INSERT, UPDATE, DELETE, and DROP privileges.

Q: How do I handle table name conflicts during migration?
A: Use the "Processing Mode of Conflicting Tables" setting. Choose "Precheck and Report Errors" to halt on conflicts, or "Ignore Errors and Proceed" to overwrite existing tables (use with caution).

## Pricing & Billing

### Billing Model
Migration tasks are billed per request or per task duration, depending on the migration type. Schema migration and full data migration are often free, while incremental data migration incurs charges based on data volume or task runtime.

### Price Reference
| Tier | Input Price | Output Price | Other Price |
|------|-------------|--------------|-------------|
| Standard Migration Task | 0.005 / | 0.005 / | — |
| DTS migration task | 0.002 / | 0.002 / | — |
| Schema migration and full data migration | Free | Free | Free |
| Incremental data migration | Charged | — | — |

### Free Tier
- Monthly quota of 100 free migration tasks for standard operations
- Schema migration and full data migration are free (excluding internet traffic fees)
- Some services offer 1000 free requests per month for DDL-related operations

### Billing Notes
- Incremental migration is charged separately and continues until the task is stopped
- Internet traffic fees apply only when using Public IP Address as the access method
- DTS instances are billed during retry periods; release promptly after migration completion
- Failed migration tasks are not charged
- Minimum billing unit is 1 minute for instance-hour models