All Products
Search
Document Center

Data Management:Export databases

Last Updated:Jul 04, 2024

If you want to perform operations such as backing up databases and exporting database tables for data analysis, you can use the data export feature of Data Management (DMS). This feature allows you to export databases by submitting tickets.

Prerequisites

  • The database is of one of the following types:

    • MySQL: self-managed MySQL, ApsaraDB RDS for MySQL, PolarDB for MySQL, AnalyticDB for MySQL, and ApsaraDB for OceanBase in MySQL mode

    • SQL Server: self-managed SQL Server and ApsaraDB RDS for SQL Server

    • PostgreSQL: self-managed PostgreSQL, ApsaraDB RDS for PostgreSQL, PolarDB for PostgreSQL, and AnalyticDB for PostgreSQL

    • Oracle: PolarDB for PostgreSQL (Compatible with Oracle)

    • ApsaraDB RDS for MariaDB and MariaDB databases from other sources

  • You have logged on to the database to be exported in DMS and have the export permissions on the database. For more information, see View owned permissions and the Submit a ticket to apply for permissions section of the "Manage permissions" topic.

Data export limits

Instance control mode

Maximum number of exported rows

Flexible Management

You can export up to 1 million rows of data per day free of charge.

Stable Change

You can export up to 20 million rows of data per day free of charge.

Secure Collaboration

No limit is set on the number of data rows to be exported.

If the control mode of an instance does not meet your business requirements, you can contact a DMS administrator or database administrator (DBA) to change the control mode of the instance. For more information, see Change the control mode of an instance.

Note

Instances managed in Flexible Management mode are free of charge. You are charged for instances managed in Stable Change or Security Collaboration mode. For more information, see Pricing.

Usage notes

  • The data record in each cell of the table to be exported can contain up to 32,767 characters. If a data record contains more than 32,767 characters, the data record cannot be exported.

  • If your tickets for exporting databases are created after May, 2024, no validity limit is set on the exported files. You can download the exported files at any time.

Procedure

  1. Log on to the DMS console V5.0.
  2. Move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner of the DMS console and choose All Features > Database Development > Data Export > Database Export.

    Note

    If you use the DMS console in normal mode, choose Database Development > Data Export > Database Export in the top navigation bar.

  3. On the Data Export Tickets page, configure the parameters that are described in the following table.

    Parameter

    Description

    Database Name

    The database that you want to export.

    Exported table

    Specifies whether to export specific tables or all tables in the database. Valid values: Partial Tables and All Tables. If you select Partial Tables, you must select tables in the section on the right side of the page.

    Note

    To export specific data from a table, you can specify a WHERE condition for the table in the Filter Condition column.

    Stakeholder

    The stakeholders involved in this export. All specified stakeholders can view the ticket details and collaborate on the ticket. Irrelevant users other than DMS administrators and DBAs are not allowed to view the ticket details.

    Export content

    The type of data that you want to export from the tables. Valid values:

    • Data: exports only the data of the tables. The data is presented as INSERT statements.

    • Structure: exports only the schema of the tables. The schema is presented as CREATE statements.

    • Data & Structure: exports both the data and schema of the tables.

    File Format

    The format of the exported file. Valid values:

    • SQL

    • CSV

    • EXCEL

    Exported Structure Type

    The type of schema that you want to export. Valid values:

    • Procedure

    • Function

    • Trigger

    • View

    • Event

    Note

    The valid values vary based on the type of database that you want to export.

    More Options

    Other objects that you want to export. Click Big Data Export Options or SQL Script Options and select the required options.

    • Big Data Export Options

      • Export TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB in hexadecimal

      • Export BINARY, VARBINARY in hexadecimal

      • Export TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT

    • SQL Script Options

      • Generate 'drop table' before 'create table' statement

      • Generate 'truncate table' before insert statement

      • Compress INSERT statements and merge values into blocks of 5 MB in size.

    Attachments

    The images or files that provide more information about this export.

  4. Click Submit and wait until the ticket is approved.

    On the Ticket Details page, you can view the approval progress in the Approval section.

    Note
    • Approval is not required if you export databases in instances managed in Flexible Management or Stable Change mode.

    • Approval rules are configured by DMS administrators and DBAs. For more information about how to customize an approval process, see Customize approval processes.

  5. After the ticket is approved, click Download Exported File in the Download section.

What to do next

  • After the database is exported, you can unsubscribe from the Stable Change or Security Collaboration control mode if you no longer need to use these billable features. This helps you reduce costs. To do this, perform the following steps:

    1. Change the control mode of an instance to Flexible Management. For more information, see Change the control mode of an instance.

    2. In the top navigation bar, move the pointer over the fee icon and select DMS Order Management. In the Purchase specification details dialog box, unsubscribe from the Stable Change or Security Collaboration control mode. For more information, see Unsubscribe from billable features.

  • If your business requirements change, close the ticket at the earliest opportunity to reduce data outflow. For more information, see the Close a ticket section of the "Ticket management" topic.

Related API operations

FAQ

  • Q: I changed the control mode of my instance before I exported data. Am I able to change the instance control mode back to the previous setting after I export data?

    A: Yes, you can change the instance control mode back to the previous setting after you export data. For more information, see Change the control mode of an instance.

  • Q: Does a file exported before May 2024 have a limited time for download availability?

    A: Yes, you cannot download exported files from tickets that are complete more than 24 hours ago. If you want to export the database, submit a ticket again.