Data archiving

Updated at:
Copy as MD

Data Management (DMS) data archiving periodically moves table data matching filter criteria to other databases or storage services. It also supports source data deletion and table space reclamation to reduce online storage costs.

Note

Data archiving is currently in public preview.

Example use case

An e-commerce platform generates large volumes of daily order data that becomes infrequently accessed over time. Use DMS data archiving to periodically archive this data, improving database performance and reducing storage costs.

Usage notes

  • Data archiving can affect the performance of running services.

    Important

    To minimize the impact, perform data archiving during off-peak hours.

  • Archiving may fail if source tables contain large object (LOB) fields such as BLOB or TEXT, or rows with large data volumes.

  • Data archiving is currently unavailable outside the Chinese mainland.

  • Tables with virtual columns cannot be archived.

  • Archiving from self-managed databases or third-party cloud databases is not supported through the DMS console or API.

DMS data archiving vs. DTS data migration

  • Purpose

    • Data archiving moves infrequently accessed data to other storage based on custom filter conditions, reducing load on your primary database.

    • Data Transmission Service (DTS) moves data between homogeneous or heterogeneous data sources. Overview of migration solutions.

  • Use cases

    • Periodically or manually move infrequently accessed data to a separate database or storage service.

    • Migrate on-premises data to the cloud, move data between Alibaba Cloud services, or split and scale out databases.

Choosing an archival destination

Engine destinations

Item

Lindorm

AnalyticDB for MySQL V3.0

AnalyticDB for PostgreSQL

ApsaraDB RDS for MySQL

PolarDB for MySQL

Supported source database types

  • MySQL-compatible: ApsaraDB RDS for MySQL, PolarDB for MySQL, and AnalyticDB for MySQL V3.0.

  • PostgreSQL-compatible: ApsaraDB RDS for PostgreSQL and PolarDB for PostgreSQL.

  • PolarDB-X 2.0.

Note

The database account for a MySQL database must have the REPLICATION CLIENT permission.

Billing

Data archiving is free. Charges apply for the destination instance and the stable change or security collaboration control mode.

Option to delete source data

Yes. DMS can automatically delete source data after archiving. This synchronous deletion reduces risk and manual effort.

  • Lock-free deletion: stable, fast, and avoids large transactions.

  • Source data is cached in a local temporary table for quick restoration if issues occur.

How to query archived data

  • Query archived data from the DMS console.

  • Query data directly through the destination database engine.

Destination configuration

  • Specify a destination instance.

  • No destination database or table required. The system creates them on the destination instance with the same names as the source.

Table schema changes

A column is added to the destination table to record the ticket ID and archiving time. This does not affect data usage.

Use cases

  • Merge multiple tables into a single wide table to improve query performance.

  • Handle high-concurrency online queries for consumer-facing applications, such as historical orders or bills.

  • Reduce storage costs with adaptive compression and intelligent hot/cold data separation.

  • Supports millisecond-level updates and sub-second queries.

  • Enables high-throughput offline processing and high-performance online analytics to improve efficiency and reduce costs.

  • Ideal for data analysis.

  • Helps reduce online storage costs.

  • Automatically synchronizes data to an analytics instance to accelerate complex queries and analysis.

  • Helps reduce storage costs.

  • Ideal for data analysis.

  • Helps reduce online storage costs.

Data control

Maximum control. Data is archived to a database instance you manage, enabling flexible data processing through direct database interaction.

Storage destinations

Item

Custom OSS bucket

DBS built-in OSS (not recommended)

Supported source database types

  • MySQL-compatible: ApsaraDB RDS for MySQL, PolarDB for MySQL, and AnalyticDB for MySQL V3.0.

  • PostgreSQL-compatible: ApsaraDB RDS for PostgreSQL and PolarDB for PostgreSQL.

  • ApsaraDB for MongoDB 3.6 or later.

  • PolarDB-X 2.0.

Note
  • After data from MongoDB is archived to dedicated storage, you can only query the data. You cannot restore the data to MongoDB.

  • You can no longer configure new data archiving tasks that use MongoDB as a source database.

  • MySQL-compatible: ApsaraDB RDS for MySQL and PolarDB for MySQL.

  • PolarDB for PostgreSQL.

  • PolarDB-X 2.0.

Billing

Data archiving is free. Charges apply for the stable change or security collaboration control mode and the destination OSS instance.

DMS creates a backup schedule in Database Backup Service (DBS). DBS charges for backup and storage based on backed-up data volume. DBS billing overview.

Note

The backup schedule created by data archiving uses the xlarge specification.

Option to delete source data

Yes. DMS can automatically delete source data after archiving. This synchronous deletion reduces risk and manual effort.

No. You must create a data change ticket to delete the original data from the source database.

How to query archived data

Query archived data through the DMS logical data warehouse.

-

Destination configuration

Specify an OSS bucket.

No OSS bucket required. The system creates a backup schedule in DBS and archives data to OSS automatically.

Table schema changes

The table schema is not changed.

The table schema is not changed.

Use cases

Reduces online storage costs (Most effective).

Reduces online storage costs (Effective).

Data control

High. Data is archived to an Alibaba Cloud OSS bucket you own and manage.

Low. Data is archived to an OSS bucket that DBS manages.

Related documentation

FAQ

  • Q: If I choose to delete the source data after archiving, can I still query the historical business data?

    A: Yes. Data archiving moves data from large tables to another database. Query the archived data from the destination instance.

API reference