---
Title: Migrate data
URL Source: https://company-skill.com/p/rds/rds-migrate-data
Language: en
Description: You need to move data into, out of, or between ApsaraDB RDS instances — whether from a self-managed database, another RDS instance, or from backup files. This includes same-engine migrations (e.g.,…
---

# Migrate data

Part of **ApsaraDB RDS**. Route queries via `POST https://company-skill.com/api/route`.

## What You Want to Do

You need to move data into, out of, or between ApsaraDB RDS instances — whether from a self-managed database, another RDS instance, or from backup files. This includes same-engine migrations (e.g., MySQL to MySQL) and cross-engine scenarios (e.g., Oracle to MySQL).

**Typical User Questions**:
- How do I migrate from self-managed DB to RDS?
- Can I migrate Oracle to MySQL?
- How to assess migration compatibility?

## Decision Tree

Pick the best path for your situation:

- **If** you need to automate migration tasks, integrate into an ops platform, or perform batch migrations → Use API (go to *rds/rds-migration*)
- **If** you have existing SQL or CSV backup files and need to restore them to a self-managed PostgreSQL instance → Use (go to *rds/rds-restoration*)
- **If** you are performing a one-time migration (especially cross-engine like Oracle to MySQL) and prefer a visual interface with progress tracking → Use (go to *rds/rds-migration*)
- **Otherwise (default)** → Start with ****, as it supports the widest range of source/target databases (including Oracle, Db2, MySQL, PostgreSQL, SQL Server) and provides guided setup via **Data Migration** in the DTS console.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| API | high | Yes | Yes | Only supports SQL Server instance-to-instance migration and PostgreSQL cloud migration; other engines require DTS | `rds/api/rds-migration` |
| Console / Dashboard | medium | No | No | Supports heterogeneous migrations (e.g., Oracle to MySQL) via **Data Migration** in DTS console | `rds/guide/rds-migration` |
| SQLCSVPostgreSQL | low | No | No | Requires RDS for PostgreSQL with **cloud disks**; local SSD backups cannot be downloaded | `rds/guide/rds-restoration` |

## Path Details

### Path 1: API

**Brief Description**: Uses ApsaraDB RDS Data Migration API to programmatically manage data migration between RDS instances or from self-managed databases. Specifically supports **SQL Server instance-to-instance migration** and **PostgreSQL cloud migration tasks** via REST calls. Requires integration using **Bearer Token** or **Alibaba Cloud signature authentication**.

**Key technical facts**:
- Billing: 1000API100 QPS

**When to Use**:
- DescribeCloudMigrationResult
- SQL Server

- Data Transmission Service

### Path 2: Console / Dashboard
**Brief Description**: Uses the **Data Migration** feature in the **DTS console** to create migration tasks through a visual interface. You specify **Source Database Type**, **Endpoint**, **Port**, **Username**, **Password**, and **Target Instance**, then choose **Migration Type** (Full, Incremental, or Full + Incremental). The workflow includes **Test Connectivity and Proceed** to validate before execution.

**Key technical facts**:
- Billing: 

- Db29.7-11.5

### Path 3: Console / Dashboard
**Best For**: SQLCSVPostgreSQL

**Brief Description**: Involves downloading backup files from **RDS Console > Instances > Select Instance > Backup & Restore**, then using a **Python script** to import the **SQL file** or **CSV file** into a **self-managed PostgreSQL instance**. This method only works for **RDS for PostgreSQL** instances that use **cloud disks**.

**Key technical facts**:
- Billing: ApsaraDB RDS

- RDS PostgreSQL

- Python 3

## FAQ

Q: Which path should I start with?
A: Start with **** if you're doing a one-time migration, especially across engines (e.g., Oracle to MySQL). It offers the broadest compatibility and guided setup via **Data Migration** in the DTS console.

Q: What if I need to migrate Oracle to MySQL but chose the API path?
A: You’ll hit a hard limitation: the API only supports SQL Server and PostgreSQL migrations. Oracle-to-MySQL requires the **Data Migration** feature in the DTS console.

Q: What if my RDS PostgreSQL instance uses local SSD storage but I try to use file import?
A: You won’t be able to **Download Backup Files** — this method only works for instances using **cloud disks**. The **Backup & Restore** section in the console will not offer downloadable backups for local SSD instances.

Q: Can I use the file import method to restore to an RDS instance instead of self-managed PostgreSQL?
A: No — the **Python script** method described in this path is designed specifically for restoring to a **self-managed PostgreSQL instance**. Restoring to another RDS instance should use either console or API migration.

Q: Will I be charged if my API migration fails?
A: Yes — the billing model states that **failed API calls still incur charges** and count toward your daily quota of 1000 tasks.

Q: Can I change the source database after starting a console migration task?
A: No — most settings like **Endpoint**, **Port**, and object selection **cannot be modified** after the task starts. Always verify connectivity using **Test Connectivity and Proceed** first.

## Related queries

migrate database, database migration, data migration, move database to RDS, transfer data to RDS, how to migrate DB, migrate self-managed DB to RDS, RDS data import, cross-engine migration, Oracle to MySQL migration, PostgreSQL restore, backup file import, DTS migration, console migration, API migra

---
Part of [ApsaraDB RDS](https://company-skill.com/p/rds.md) · https://company-skill.com/llms.txt
