All Products
Search
Document Center

Data Management:Data archiving

Last Updated:Dec 31, 2025

As rarely accessed historical data accumulates in your online database, it consumes more storage space and can degrade query performance and impact business operations. You can use the data archiving feature of Data Management (DMS) to periodically archive table data that meets specific filter conditions to other databases or storage services. This feature also supports deleting data from source tables and reorganizing tablespaces to reduce online storage costs.

Note

The data archiving feature is currently in public preview.

Example scenario

In an e-commerce platform, a large volume of order data is generated daily. Over time, this data is accessed less frequently. To improve database performance and reduce storage usage, you can use the DMS data archiving feature to periodically archive this order data.

Notes

  • The data archiving operation may affect the performance of your services.

    Important

    To minimize the impact, perform the archive operation during off-peak hours.

  • The archive task may fail if the tables to be archived contain large objects, such as BLOB and TEXT, or rows with a large amount of data.

  • The data archiving feature is not available in regions outside China.

  • You cannot archive data from tables that contain virtual columns.

  • You cannot archive data from a database hosted on a third-party cloud or a self-managed database using the DMS console or an API.

Differences between data archiving in DMS and data migration in DTS

  • Purpose

    • Data archiving lets you use custom filter conditions to archive infrequently accessed data to other storage. This reduces the load on the primary database and improves performance.

    • Data migration moves data between homogeneous and disparate data sources. For more information, see Overview of migration solutions.

  • Scenarios

    • Data archiving lets you periodically or immediately archive infrequently accessed data to other databases or storage.

    • Data migration is suitable for scenarios such as migrating data to the cloud, migrating data between tasks within Alibaba Cloud, and splitting or scaling out databases.

Guide to selecting an archive destination

Engine-based destinations

Comparison Item

Lindorm

AnalyticDB for MySQL 3.0

AnalyticDB for PostgreSQL

RDS for MySQL

PolarDB for MySQL

Supported source database types

  • MySQL types: RDS for MySQL, PolarDB for MySQL, and AnalyticDB for MySQL 3.0.

  • PostgreSQL types: RDS for PostgreSQL and PolarDB for PostgreSQL.

  • PolarDB-X 2.0.

Note

The MySQL database account must have the REPLICATION CLIENT permission.

Billing

The data archiving feature is free of charge. Fees are incurred when you purchase a destination instance and the Stable Change or Security Collaboration control mode.

Deletion of source data after archiving

Supports automatic deletion of source data. This ensures that data archiving and source data deletion are completed in sync, which reduces the hassle and risks of deleting source data later.

  • Source data is deleted using a lockless change method that is stable and fast, and does not generate large transactions.

  • Source data is cached in a local temporary table and can be quickly recovered if needed.

How to query archived data

  • Query the archived data in the DMS console.

  • Query the archived data using the corresponding database engine.

Specify archive location

  • Specify an archive instance.

  • You do not need to specify an archive database or table. The system automatically creates a database and a table on the archive instance based on the names of the source database and table.

Table schema changes

A new column is added to record the ticket ID, archiving time, and other information. This does not affect data usage.

Use cases

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

  • Handle high-concurrency online queries and retrievals of data for consumer-facing scenarios, such as historical bill or order data.

  • Use adaptive compression and intelligent hot and cold data separation for full data to reduce storage costs.

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

  • Support high-throughput offline processing and high-performance online analysis to reduce costs and improve efficiency.

  • Analyze data.

  • Reduce online storage costs.

  • Automatically sync data to an analytic instance to accelerate complex analysis and queries.

  • Reduce storage costs.

  • Analyze data.

  • Reduce online storage costs.

Data control

Strongest. Data is archived to a database instance that you manage. You can flexibly process data by interacting with the database.

StorageClass

Comparison Criteria

User OSS

DBS built-in OSS (Not recommended)

Supported source database types

  • MySQL types: RDS for MySQL, PolarDB for MySQL, and AnalyticDB for MySQL 3.0.

  • PostgreSQL types: RDS for PostgreSQL and PolarDB for PostgreSQL.

  • MongoDB 3.6 or later.

  • PolarDB-X 2.0.

Note
  • After you archive data from a MongoDB database to this destination, you can only query the data. You cannot restore the data to the MongoDB database.

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

  • MySQL types: RDS for MySQL and PolarDB for MySQL.

  • PolarDB for PostgreSQL.

  • PolarDB-X 2.0.

Billing

The data archiving feature is free of charge. Fees are incurred when you purchase a Stable Change or Security Collaboration control mode and a destination OSS instance.

DMS creates a backup schedule in DBS. DBS charges fees for backup and storage based on the amount of backed-up data. For more information, see DBS pricing.

Note

The DBS backup schedule created for data archiving is of the xlarge specification.

Deletion of source data after archiving

Does not support automatic deletion of source data. You must create a regular data change ticket to clear the archived data from the database.

How to query archived data

Supports querying archived data through the DMS logical data warehouse.

-

Specify archive location

You must specify an OSS bucket.

You do not need to specify an OSS bucket. The system automatically creates a backup schedule in DBS and archives the data to OSS.

Table schema changes

The table schema does not change.

Use cases

Reduce online storage costs (strongest capability).

Reduce online storage costs (strong capability).

Data control

Strong. Data is archived to an Alibaba Cloud OSS bucket that you own.

Weak. Data is archived to a built-in OSS bucket in DBS.

Archive link documents

FAQ

  • Q: If I choose to clear source table data during the data archiving process, can I still query the historical business data?

    A: Yes. The data archiving feature archives data to another database. You can query the destination database to access the historical business data.

  • Q: When I create a data archiving ticket in DMS, the page displays the message "The content is empty, no backup is needed." Why?

    A: This message indicates that no data in the database matches the archiving conditions that you configured. Check if your archiving rules are set correctly. After you click Submit, the system generates and displays a preview of the archiving SQL statement based on your configuration. You can run this SQL statement to preview the data range and check the matching results to ensure that your configuration is correct.

Related API operations