ApsaraDB MyBase for MySQL automatically backs up your instance data and binary logs on a schedule you define. If data is lost or corrupted, restore it from these backups. ApsaraDB MyBase for MySQL supports both automatic backup and manual backup. This topic describes the automatic backup feature.
How automatic backup works
ApsaraDB MyBase for MySQL performs two types of automatic backup:
Data backup: A full backup of your instance data. The backup type depends on the storage type — Enhanced SSD (ESSD) instances use Snapshot Backup by default, and local SSD instances use Physical Backup by default.
Log backup: Binary logs captured continuously to support point-in-time recovery (PITR). Log backup is enabled by default.
The retention period you set determines your recovery window. A 7-day retention period means you can restore data to any point within the last 7 days.
Schedule backups during off-peak hours to minimize impact on your workload.
Limitations
| Limitation | Details |
|---|---|
| Read-only instances | Backup policies cannot be configured for read-only instances. |
| DDL statements | Do not run DDL statements during a backup. DDL statements lock the affected tables, which causes the backup to fail. |
| Table count | If a database contains more than 600,000 tables, backup cannot run. Split large table sets across multiple databases to stay within this limit. |
| Backup file download | Download backup files before the retention period ends. Files are deleted automatically when the retention period elapses. |
Prerequisites
Before you begin, ensure that you have:
An ApsaraDB MyBase for MySQL instance (non-read-only)
Access to the ApsaraDB for MyBase console
Configure automatic backup
Log on to the ApsaraDB for MyBase console.
In the upper-left corner, select a region.
In the left-side navigation pane, choose Instances > MySQL.
Find the instance you want to configure, and click Details in the Actions column.
In the left-side navigation pane, click Backup and Restoration.
On the Backup and Restoration page, click the Backup Settings tab, then click Edit.
Configure the data backup and log backup settings described in the following sections, then click Save.
Data backup settings
The following parameters apply to all instances (ESSD and local SSD):
| Parameter | Description |
|---|---|
| Data Backup Retention (Days) / Retention Period | The number of days to retain data backups, which equals your maximum recovery window. Default: 7 days. For ESSD instances, valid range is 7–730 days. For local SSD instances, valid values are any integer ≥ 7 and < 2³¹. Backups retained for 730 days or fewer are regular backups. Backups retained for more than 730 days are archived backups. If you set a value greater than 730 or enable Long-term Retention, specify how many archived backups to keep — for example, selecting Monthly and entering 2 retains the first two archived backups generated each month. |
| Backup Cycle | The days of the week on which data backups run. Select at least two days per week. |
| Backup Time | The one-hour time window during which the backup runs (for example, 05:00–06:00). Schedule this window during off-peak hours to minimize the impact on your workload. |
The following parameters apply to local SSD instances only:
| Parameter | Description |
|---|---|
| Data Backup Retention Policy After Release | What happens to backups when the instance is released. Options: None, Latest, or All. |
| Restore Individual Database/Table | Enables granular restore at the database or table level. Enabled by default and cannot be disabled. |
| Restore Speed | The speed at which individual databases and tables are restored. For details, see Restore individual databases and tables of an ApsaraDB RDS for MySQL instance. |
The following parameters apply to ESSD instances only:
| Parameter | Description |
|---|---|
| Single-digit Second Backup | Enables snapshot backups that complete in seconds. Enabling this feature sets the data backup retention period to 7 days. |
| Increase Snapshot Frequency | Increases snapshot frequency to as often as once every 15 minutes. Requires Single-digit Second Backup to be enabled — if that feature is disabled, enabling this parameter enables it automatically. When enabled, the snapshot retention policy depends on the granularity you set: Minute granularity — all snapshots within the last hour are kept; snapshots older than 1 hour are pruned to one per hour; snapshots older than 24 hours are pruned to one per day (retained after 00:00). Hour granularity — all snapshots within the last 24 hours are kept; snapshots older than 24 hours are pruned to one per day (retained after 00:00). |
Log backup settings
| Parameter | Description |
|---|---|
| Log Backup | Enables binary log backup for point-in-time recovery. Enabled by default. |
| Log Retention Period (Days) | The number of days to retain log backups. Valid range: 7–730 days. Default: 7 days. Must be less than or equal to the Data Backup Retention (Days) value. |