ApsaraDB RDS provides three distinct approaches to data replication: data migration, data synchronization, and data restoration. Each serves a different purpose and suits different scenarios. Use this page to choose the right approach for your use case.
Quick comparison
| Data migration | Data synchronization | Data restoration | |
|---|---|---|---|
| Purpose | Move data to or from Alibaba Cloud | Keep two data sources in sync continuously | Recover an RDS instance from a backup |
| Duration | One-time task; release after completion | Ongoing; runs continuously after setup | One-time operation |
| Incremental support | Optional (with incremental data migration) | Always real-time | No |
| Two-way sync | No | Yes | No |
| Typical tools | Data Transmission Service (DTS) | Data Transmission Service (DTS) | ApsaraDB RDS console |
Data migration
Data migration is a one-time operation for moving data between environments. Use DTS to migrate data from:
An on-premises database
A user-created database on an ECS instance
A database on a third-party cloud platform
Migration also supports the reverse direction: from Alibaba Cloud to a user-created database.
When you select the incremental data migration option, changes made to the source during the migration are captured and applied to the target. This differs from data synchronization: migration tasks have a defined end state, and you can release a migration task immediately after it completes.
When not to use data migration
| If you need... | Use instead |
|---|---|
| Continuous, real-time replication between two active data sources | Data synchronization |
| Recover from accidental deletion or data corruption | Data restoration |
| Two-way synchronization between databases | Data synchronization |
Data synchronization
Data synchronization keeps two data sources in sync in real time. Unlike migration, a synchronization task runs continuously after setup to maintain data consistency between the specified sources.
Data synchronization also supports features that migration does not:
Online updates to the set of synchronized objects without stopping the task
Two-way data synchronization between two active databases
Use data synchronization for scenarios such as:
Active geo-redundancy: Keep geographically distributed databases in sync for high availability
Disaster recovery: Maintain a live standby database that stays current with the primary
Cross-border data synchronization: Replicate data across regions or countries
Query load balancing: Distribute read traffic across synchronized database instances
Cloud BI systems: Feed real-time data from your RDS instance into a business intelligence platform
Real-time data warehousing: Stream transactional data into a data warehouse as it is written
When not to use data synchronization
| If you need... | Use instead |
|---|---|
| A one-time move to Alibaba Cloud | Data migration |
| Recover a database to a previous state | Data restoration |
| Migrate data from an on-premises source with no ongoing replication needed | Data migration |
Data restoration
Data restoration recovers an RDS instance from a backup. Two restore targets are available:
From a backup file: Restores the RDS instance to the state captured in a specific backup
To a point in time: Restores the RDS instance to a specific point in time using a backup file combined with a binary log file
Data restoration is suited for recovering from accidental data loss or corruption, not for moving or replicating data to another system.
When not to use data restoration
| If you need... | Use instead |
|---|---|
| Migrate data from an external source to Alibaba Cloud | Data migration |
| Keep a secondary database in sync with the primary | Data synchronization |
| Support incremental replication during a cutover | Data migration (with incremental data migration option) |
Combining migration and restoration
Data migration and data restoration can be used together. For example, to roll back changes to an RDS instance without updating application endpoints:
Restore the RDS instance to a new instance at the desired point in time.
Use DTS to migrate the data from the new instance back to the original RDS instance.
This approach preserves the original endpoint, so your application requires no reconfiguration.