All Products
Search
Document Center

Data Management:Archive data to OSS buckets connected to DBS

Last Updated:Dec 13, 2023

This topic describes how to archive the data of large tables to Object Storage Service (OSS) buckets that are connected to Database Backup (DBS).

Prerequisites

  • The source database from which you want to archive data is of one of the following types:

    • MySQL: ApsaraDB RDS for MySQL and PolarDB for MySQL

    • PolarDB for PostgreSQL

    • PolarDB-X

    Note

    If the source database is a MySQL database, the database account of the source database must have the REPLICATION CLIENT permission.

  • Your system role has the export permissions on the database. For more information about how to view and apply for permissions, see View owned permissions and Manage permissions.

Usage notes

The data archiving feature is supported only in the Singapore and Indonesia (Jakarta) regions.

Billing

Data Management (DMS) creates a backup schedule in DBS to periodically archive data to OSS. You are charged for data backup in DBS based on the amount of data that is backed up. In addition, you are charged storage fees for archiving the backup data to OSS buckets that are connected to DBS. For more information, see Billing overview.

Note

By default, a backup schedule of the xlarge type is created in DBS for data archiving.

Procedure

  1. Log on to the DMS console V5.0.
  2. In the top navigation bar, choose Solution > Data archiving.
  3. In the upper-right corner of the Archive DataTickets page, click Archive Data.

  4. On the Ticket Application page, configure parameters to create a data archiving ticket. The following table describes the parameters.

    Parameter

    Description

    Task Name

    The name of the data archiving task. We recommend that you specify a descriptive name that makes it easy to identify the task. This helps you reduce unnecessary communication.

    Archiving Destination

    The destination to which you want to archive data. Select OSS Buckets Connected to DBS.

    Source Database

    The source database from which you want to archive data.

    Archive configuration

    1. Specify one or more tables whose data you want to archive.

    2. Optional. Specify one or more filter conditions for querying data to be archived in the specified tables.

      Note

      If you want to use time variables in scenarios such as archiving data generated six months ago, you can set the variables in the Variable Configuration section before you configure the parameters in the Archive configuration section.

    Variable Configuration

    Optional. The time variables that you want to use for data archiving. For more information, see the Configure time variables section of the "Variables" topic.

    Running Mode

    The method to be used for running the data archiving task. Valid values:

    • Single execution: After the data archiving ticket is approved, DMS runs the data archiving task only once.

    • Cyclic scheduling: After the data archiving ticket is approved, DMS runs the data archiving task based on the scheduling cycle that you specify. For more information, see the Periodic scheduling section of the "Archive data to a Lindorm instance" topic.

  5. Click Submit.

    After the data archiving ticket is approved, DMS automatically runs the data archiving task.

    Note

    The data archiving feature implements data archiving and post-behavior based on the UTC+0 time zone regardless of the time zone of the database to be archived.

  6. Optional. Query the archived data.

    1. Create a data lake in DBS for backup sets. For more information, see the Create a data lake section of the "Query data from multiple backup sets at a time" topic.

    2. Optional. Register the data lake with DMS. After the registration, you can query data on the SQLConsole tab and perform data analysis and development by using the task orchestration feature.

      Note

      For more information, see Register an Alibaba Cloud database instance.

  7. Optional. After the data of the source tables is archived, delete the archived data from the source tables and optimize the storage usage of the source tables.

    1. To delete the archived data from the source tables, create a Normal Data Modify ticket. For more information, see Perform regular data change.

    2. To optimize the storage usage of the source tables, create a lock-free change ticket. For more information, see Perform lock-free DDL operations.