Export data from DMS to an SQL, CSV, or Excel file
Data Management (DMS) lets you export table data from ApsaraDB RDS for MariaDB directly from the console — no command-line tools required. Choose the export format based on how you plan to use the data:
| Format | Use case |
|---|---|
| CSV | General-purpose data exchange. Use when importing data into spreadsheets, analytics tools, or other databases. |
| SQL | Portable database backup. Use when you need to restore the table structure and data to another instance by replaying SQL statements. |
| Excel | Formatted data for reporting. Use when sharing data with non-technical stakeholders who work in Microsoft Excel. |
Prerequisites
Before you begin, ensure that you have:
-
Access to the DMS console
-
A database instance with data to export
Check source data
In the DMS console, verify that the table you want to export contains data.
Check the character set of a table
If you plan to export as CSV and the table contains non-ASCII characters (for example, Chinese, Japanese, or Arabic text), check the table's character set first.
Run the following statement in the DMS SQL editor:
show create table <Table name>;
Create an export task
-
In the DMS console, choose Database Development > Data Export > Database Export.
-
Click Database Export.
-
Select the table to export, then configure the following parameters:
Parameter Description File Format The output file type: CSV, SQL, or Excel. Exported Structure Type What to include in the export: the table definition only, or both the table definition and its row data. -
Click Submit.
FAQ
When I restore data from a DMS-exported SQL file to a self-managed instance, only the table names are restored. Why?
This happens when Export content is not set to Data & Structure during the export. The exported SQL file then contains only the table definition, not the row data.
To restore both table structure and data:
-
Set Export content to Data & Structure when creating the export task.
-
On the self-managed instance, create the target database before running the SQL script.
-
Run the SQL script against that database to restore both the table structure and data.