Background information
When the amount of data in an online database increases, the query performance and business operations may be affected. OceanBase Developer Center (ODC) allows you to periodically archive table data from one database to another to address this issue.
This topic describes how to archive data by submitting a ticket.
Prerequisites
- The table to be archived has a primary key.
Create a data archiving task
Example: Archive the student table in the odc_test database to the test database.
| Parameter | Example value |
|---|---|
| Data source | mysql_4.2.0 |
| Source database name | odc_test |
| Destination database name | test |
| Table name | student |
On the Ticket tab in the left-side navigation pane of the homepage, click Data Archiving and then click New Data Archiving.

On the Create Data Archiving Task page, configure the following parameters.

Parameter Description Source Database The database to which the table belongs. Destination Database The database to which the table is to be archived. Variable Configuration Optional. You can define variables and set time offsets to filter rows to be archived. Archiving Scope - Partial Archiving: specifies to archive only tables that meet filtering conditions in the source database.
You can configure filtering conditions by using constants or referencing variables defined in Variable Configuration. For example, increate<'${create_time}',create_timeis the name of a variable configured in Variable Configuration andcreateis a field in the table to be archived. - Database Archiving: specifies to archive all tables in the source database.
Execution Mode The execution mode of the task. Valid values: Execute Now, Scheduled Execution, and Periodic Execution. Remarks Optional. Additional information about the task, which cannot exceed 200 characters in length. - Partial Archiving: specifies to archive only tables that meet filtering conditions in the source database.
Click Create.
After the task is generated, choose Ticket > Data Archiving to view the task.

View a data archiving task
Task information
In the data archiving task list, click View in the Actions column of a task.
On the task details panel that appears, click the Basic Information tab and view information such as the task type, source database, destination database, variable configurations, archiving scope, and execution mode.

Task process
On the task details panel, click the Task Process tab and view information such as the task initiation status, approval status, execution status, execution result.
Execution records
On the task details panel, click the Execution Records tab and view task status and perform operations such as task retry and rollback.
Task logs

On the task details panel, click the Operating Records tab and view the approval status and records of the task.