This topic describes how to back up individual databases or tables on an ApsaraDB RDS for MySQL instance.
Automatically back up individual databases and tables
-
Default ApsaraDB RDS backups: To ensure data security, the default backup feature of ApsaraDB RDS backs up all databases and tables. It does not support partial backups. If you do not need to back up certain databases or tables, delete them or migrate them to an on-premises environment.
-
Data Disaster Recovery backups: The logical backup feature of Data Disaster Recovery supports automatic backups of specific databases and tables.
-
If your goal is to reduce the size and cost of default ApsaraDB RDS backups, see Reduce backup costs.
For more information about how to restore individual databases and tables, see Restore individual databases and tables.
Manually back up specific databases and tables
Method 1: Use the ApsaraDB RDS console
You can create a manual backup task to back up specific databases. This method currently does not support backing up specific tables.
Prerequisites
-
The ApsaraDB RDS for MySQL instance must meet the following requirements:
The RDS instance runs MySQL 8.0, MySQL 5.7, or MySQL 5.6.
The RDS instance runs RDS High-availability Edition or runs MySQL 5.7 on RDS Enterprise Edition.
-
Storage type: local SSDs
NoteInstances that use cloud disks support only snapshot backups and do not support backing up specific databases or tables. If you need to back up data from a single database on such an instance, you can use the Data Export feature of DMS or run the mysqldump command to export the data to an SQL file.
-
If you are using the RDS backup service for the first time, you must use your Alibaba Cloud account to authorize the AliyunServiceRoleForDBS service-linked role. For more information, see Authorize the service-linked role for Data Disaster Recovery.
You can go to the Basic Information page of your RDS instance to obtain 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 that appears, click Backup Instance.
-
In the dialog box that appears, set the Select Backup Mode parameter to Logical Backup and the Backup Policy parameter to Single-Database Backup.
Select the databases that you want to back up and click the
icon to move the selected databases to the right-side section. Then, click OK. -
(Optional) Check the progress of the backup task.
This action creates a logical backup task. Click Tasks in the upper-right corner. On the Tasks page, filter the tasks by setting Task Type to Manual Backup Instance to view the backup progress.
-
(Optional) Restore the backup data.
To restore from this logical backup, see Restore a logical backup file of an ApsaraDB RDS for MySQL instance to a self-managed database and Restore individual databases and tables.
Method 2: Use Data Disaster Recovery
-
Create a backup schedule (set the backup method to logical backup).
-
Configure the backup schedule. When you configure the backup time, select Single Backup.
For more information, see Back up an ApsaraDB RDS for MySQL or self-managed MySQL instance by using a logical backup.
Related 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.
Category | Operation | Description |
ApsaraDB RDS | Modifies the backup settings of an instance. | |
Queries the backup settings of an instance. | ||
Queries backup sets. | ||
Queries the backup tasks of an instance. | ||
Data Disaster Recovery | Creates a backup schedule. | |
Configures a backup schedule. |