This topic describes how to back up individual databases or tables of an ApsaraDB RDS for MySQL instance.
Automatically back up individual databases and tables
Default backup of ApsaraDB RDS: To ensure data security, the default backup of ApsaraDB RDS backs up all databases and tables and does not support backing up only some of them. If you do not need to back up specific databases or tables, we recommend that you delete these databases and tables or migrate them to your computer.
Data Disaster Recovery: Logical backup of Data Disaster Recovery supports automatically backing up individual databases and tables.
If your goal is to reduce the size and cost of default ApsaraDB RDS backups, see Reduce backup costs.
If your goal is to restore databases and tables, see Restore databases and tables.
Manually back up individual databases and tables
Method 1: Use the default backup feature in the ApsaraDB RDS console
You can manually create a backup task to back up specific databases. Backing up specific tables is not supported.
Prerequisites
The RDS instance meets the following requirements:
The major engine version is MySQL 8.0, MySQL 5.7, or MySQL 5.6
Edition: High Availability Edition or MySQL 5.7 RDS Enterprise Edition
Storage type: Local SSD
NoteRDS instances that use standard SSDs or enhanced SSDs support only snapshot backups and therefore do not support backing up specific databases or tables. If you need to back up data from a single database, you can use the DMS data export feature or export the data of the specified database as an SQL file by using the mysqldump command for backup.
If this is the first time you use the backup feature of ApsaraDB RDS, make sure that the AliyunServiceRoleForDBS service-linked role is created by using your Alibaba Cloud account. For more information, see How do I create a service-linked role for Data Disaster Recovery?
You can go to the Basic Information page of the instance to view the preceding information.
Procedure
Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.
In the upper-right corner of the page, click Backup Instance.
In the dialog box that appears, set Select Backup Mode to Logical Backup and Backup Policy to Single-Database Backup.
Select the databases that you want to back up, click
to add them to the right side, and then click OK.
(Optional) View the backup task progress.
The system generates a logical backup task. You can click the
button in the upper-right corner and go to the Tasks page. Then, filter the Task Type to Manual Backup to view the backup progress.
(Optional) Restore the backup data.
To restore the logical backup, see Restore logical backup files of an ApsaraDB RDS for MySQL instance to a self-managed database or Restore databases and tables.
Method 2: Use Data Disaster Recovery for backup
Create a backup plan (select Logical Backup as the backup method).
Configure the backup plan. When you configure the backup time, select One-time Backup.
For more information, see Back up an ApsaraDB RDS for MySQL instance or a self-managed MySQL database.
Related API operations
You can also call the API operations listed in the following table to manage the backup policies of your RDS instance or configure Data Disaster Recovery backup schedules.
Classification | API operation | Description |
Use ApsaraDB RDS to perform backups | Modifies the backup settings of an ApsaraDB RDS instance. | |
Queries the backup settings of an instance. | ||
Queries backup sets. | ||
Queries the backup tasks of an ApsaraDB RDS instance. | ||
Use Data Disaster Recovery to perform backups | Creates a backup plan. | |
Configures a backup plan. |