When large tables grow beyond what your primary database can cost-effectively store, you can archive them to Object Storage Service (OSS) through Data Disaster Recovery (DBS). After archiving, you can query the data by creating a data lake in DBS or by running SQL queries directly on the SQLConsole tab in DMS.
This feature is available only in the Singapore and Indonesia (Jakarta) regions.
How it works
-
Submit a data archiving ticket in DMS with the source tables and archiving schedule.
-
After the ticket is approved, DMS creates an xlarge backup schedule by default in DBS to periodically export the specified table data to an OSS bucket.
-
(Optional) To query archived data, create a data lake in DBS for the backup sets. Register the data lake with DMS to run SQL queries and build data pipelines.
All archiving operations run in UTC+0, regardless of the time zone of the source database.
Prerequisites
Before you begin, ensure that you have:
-
A source database of one of the following types:
-
ApsaraDB RDS for MySQL or PolarDB for MySQL
-
PolarDB for PostgreSQL
-
PolarDB-X 2.0
-
-
The REPLICATION CLIENT permission on the MySQL source database account (MySQL databases only)
-
Export permissions on the source database for your system role — see View owned permissions and Manage permissions
-
Data Disaster Recovery activated — see How do I activate?
Usage notes
The data archiving feature is available only in the Singapore and Indonesia (Jakarta) regions.
Billing
DMS creates an xlarge backup schedule by default in DBS to run the archiving job. You are charged for:
-
Data backup in DBS, based on the amount of data backed up
-
Storage fees for the archived data in the connected OSS buckets
For pricing details, see Billing overview.
Archive data to OSS
-
Log on to the DMS console V5.0.
-
In the top navigation bar, choose Solution > Data archiving.
-
In the upper-right corner of the Archive DataTickets page, click Archive Data.
-
On the Ticket Application page, configure the following parameters:
Parameter Description Task Name A descriptive name for the archiving task. A clear name helps you identify the task without follow-up. Archiving Destination Select OSS Buckets. Source Database The source database to archive data from. Variable Configuration (Optional) Time variables for archiving. Configure this section before Archive configuration if you use time variables — for example, to archive data generated six months ago. For details, see the Configure time variables section of the "Variables" topic. Archive configuration Specify one or more tables to archive. Optionally add filter conditions to select which rows to archive from the specified tables. Running Mode Single execution: DMS runs the task once after the ticket is approved. Cyclic scheduling: DMS runs the task on the schedule you specify. For details, see the Periodic scheduling section of the "Archive data to a Lindorm instance" topic. -
Click Submit.
After the ticket is approved, DMS automatically runs the archiving task.
(Optional) Query archived data
-
In DBS, create a data lake for the backup sets. For details, see the Create a data lake section of the "Query data from multiple backup sets at a time" topic.
-
(Optional) Register the data lake with DMS to query data on the SQLConsole tab and perform data analysis and development by using the task orchestration feature. For details, see Register an Alibaba Cloud database instance.
(Optional) Clean up source tables
After data is archived, free up storage in the source tables:
-
To delete the archived rows from the source tables, create a Normal Data Modify ticket. For details, see Normal Data Modify.
-
To reclaim the freed space, create a lock-free change ticket. For details, see Perform lock-free DDL operations.