To back up a database or export tables for data analysis, use the data export feature of Data Management Service (DMS). You can export a database by submitting a ticket.
Prerequisites
-
This feature supports the following database types:
-
MySQL databases: self-managed MySQL, ApsaraDB RDS for MySQL, PolarDB for MySQL, AnalyticDB for MySQL, and ApsaraDB for OceanBase in MySQL mode.
-
SQL Server databases: self-managed SQL Server and ApsaraDB RDS for SQL Server.
-
PostgreSQL databases: self-managed PostgreSQL, ApsaraDB RDS for PostgreSQL, PolarDB for PostgreSQL, and AnalyticDB for PostgreSQL.
-
Oracle-compatible databases: PolarDB for PostgreSQL (compatible with Oracle).
-
ApsaraDB for MariaDB and other MariaDB databases.
-
-
You are logged on to the database that you want to export in DMS and have the required permissions. For more information, see View my permissions and Apply for permissions on resources.
Export limits
|
Control mode |
Row limit |
File size limit |
|
Flexible Management |
Up to 1 million rows per day for free. |
Up to 50 GB per file. |
|
Stable Change |
Up to 20 million rows per day for free. |
Up to 50 GB per file. |
|
Secure Collaboration |
Unlimited rows. |
Up to 50 GB per file. |
If the current control mode of the instance does not meet your business requirements, an administrator or DBA can change the control mode. For more information, see Change the control mode of an instance.
Flexible Management is free. Stable Change and Secure Collaboration are paid features. For pricing details, see Billable items (DMS).
In the instance tree on the left, right-click the target instance, choose Control mode, and then select the desired mode, such as Flexible Management, from the submenu.
Precautions
-
If you export data to an Excel file, the export may fail if a cell contains more than 32,767 characters.
Procedure
Log in to DMS 5.0.
Move the pointer over the
icon in the upper-left corner of the DMS console and choose . NoteIf you use the DMS console in normal mode, choose in the top navigation bar.
-
Configure the parameters for the data export ticket.
Parameter
Description
Database Name
Select the database to export.
Exported Table
Select Partial Tables or All Tables. If you select Partial Tables, select the required tables in the pane on the right.
NoteTo configure filter conditions for specific tables, double-click the WHERE clause.
Stakeholder
Add stakeholders who can view and collaborate on the ticket. The ticket is not visible to other users, except for administrators and DBAs.
Export Content
Select the content to include in the export:
-
Data: Exports table data as
INSERTstatements. -
Structure: Exports the table schema as
CREATEstatements. -
Data and Structure: Exports both the table data and schema.
File Format
Specifies the format of the exported file.
-
SQL
-
CSV
-
EXCEL
Exported Structure Type
Select the types of schema objects to export.
-
Procedure
-
Function
-
Trigger
-
View
-
Event
NoteThe supported schema objects vary by database type. See the console for available options.
Export Timeout
The timeout period for the export task, in seconds. The value can range from 0 to 2,147,483. If you leave this blank, DMS uses the default instance-level export timeout. To view the instance-level timeout, see Add a database instance.
NoteThe task fails if it does not complete within the specified timeout period.
More Options
Click Big Data Export Options or SQL Script Options and select the desired options.
Attachments
You can upload images or documents to provide more context for the ticket.
-
-
After you complete the configuration, click Submit and wait for approval.
You can track the approval progress in the Approval section on the ticket details page.
Note-
Exports from instances in Flexible Management or Stable Change mode do not require approval.
-
The approval process for tickets is configured by administrators or DBAs. To customize the approval process, see Customize approval workflows for tickets.
-
-
After the ticket is approved, in the Download section, click Download Exported File.
Next steps
-
After the export is complete, consider unsubscribing from the Stable Change or Secure Collaboration modes to avoid unnecessary costs. To do so:
-
Change the control mode of the instance to Flexible Management. For more information, see Change the control mode of an instance.
-
In DMS Order Management, unsubscribe from the target control mode product. For more information about the refund policy, see Refund policy.
-
-
If the export is no longer needed, close the ticket promptly to prevent potential data leaks. For more information, see Close a ticket.
API reference
FAQ
-
Q: If I change the control mode before exporting, can I switch the instance back to the original mode after the export?
A: Yes. For more information, see Change the control mode of an instance.