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
ApsaraDB RDS: For data security purposes, ApsaraDB RDS provides the automatic backup feature to back up all the databases and tables on your RDS instance. The automatic backup feature cannot be used to back up specific databases or tables. If you do not need to back up specific databases or tables, we recommend that you delete the databases and tables or migrate them to your computer.
Data Disaster Recovery: Data Disaster Recovery provides the logical backup feature to support the automatic backup of specific databases and tables. For more information, see Back up an ApsaraDB RDS for MySQL or self-managed MySQL instance by using logical backup.
For more information about how to reduce the size and storage costs of your automatic backup files that are generated by ApsaraDB RDS, see Backup storage fees.
For more information about how to restore individual databases and tables, see Restore individual databases and tables.
Manually back up specific databases and tables
A manual backup indicates that you manually create a backup file.
Use ApsaraDB RDS to perform backups
Prerequisites
Your RDS instance meets 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.
The RDS instance uses local disks.
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 your RDS instance to obtain the preceding information.
Usage notes
If your RDS instance runs RDS High-availability Edition with local disks, you can back up only specified databases but not specified tables. For more information, see Storage types.
RDS instances that use cloud disks support only snapshot backups. You cannot back up specified databases or tables of the RDS instances.
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. View the progress of the backup task.
The system generates a logical backup task. You can click the
icon in the upper-right corner of the page. On the Tasks page, you can set the Task Type parameter to Manual Backup to view the backup progress.
Optional. Restore the backup data.
You can restore the data of your RDS instance from the generated logical backup file. For more information, see Restore the data of an ApsaraDB RDS for MySQL instance from a logical backup file to a self-managed MySQL instance and Restore individual databases and tables of an ApsaraDB RDS for MySQL instance.
Use Data Disaster Recovery to perform backups
Create a backup schedule. Make sure that you select the logical backup method. For more information, see Purchase a backup schedule.
Configure a backup schedule and select Single Backup for the backup schedule. For more information, see Configure a backup schedule.
For more information, see Back up an ApsaraDB RDS for MySQL or self-managed MySQL instance by using 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. |