This topic describes how to enable the automatic backup feature for an ApsaraDB RDS for MySQL instance. ApsaraDB RDS supports automatic backups and manual backups.
For more information about how to enable the automatic backup feature for an RDS instance that runs a different database engine, see the following topics:
- Back up an ApsaraDB RDS for SQL Server instance
- Back up an ApsaraDB RDS for PostgreSQL instance
- Automatically back up the data of an RDS MariaDB instance
Introduction to backups
- ApsaraDB RDS: ApsaraDB RDS provides a default backup feature that supports full backups and incremental backups.
- Database Backup (DBS): DBS provides an advanced backup feature. This feature supports cross-account backups and allows DBS to create a backup within seconds.
Use ApsaraDB RDS to perform automatic backups
ApsaraDB RDS supports automatic data backups and automatic log backups. Data backups cannot be disabled. However, you can change the data backup frequency based on your business requirements.Instance configuration | Minimum frequency | Maximum frequency |
---|---|---|
|
Twice every week. | Once every day. |
RDS instances that run RDS High-availability Edition with standard SSDs or ESSDs | Once every 15 minutes. You must enable the Increase Snapshot Frequency feature. |
- Backup policies cannot be configured for read-only RDS instances.
- Do not execute DDL statements during a backup. These statements trigger locks on tables, and the backup may fail as a result of the locks.
- We recommend that you back up your RDS instance during off-peak hours.
- If the number of tables that are created on your RDS instance exceeds 600,000, backups cannot be created. In this case, we recommend that you shard the databases on your RDS instance.
- If the number of tables that are created on your RDS instance exceeds 50,000, you cannot restore individual databases or tables. For more information, see Restore the individual databases and tables of an ApsaraDB RDS for MySQL instance.
Procedure
Use DBS to perform automatic backups
- Create a backup schedule. Make sure that you select the logical backup method.
- Configure the backup schedule that you created.
FAQ
- When a backup is in progress, does the performance of my RDS instance decrease?
- Backup operations of an ApsaraDB RDS instance on RDS High-availability Edition or RDS Enterprise Edition are performed on the secondary instance. Therefore, they do not occupy CPU resources
of the primary instance or affect its performance.
Note In rare cases when the secondary instance is unavailable, backups are performed on the primary instance.
- If an ApsaraDB RDS instance runs the RDS Basic Edition, it stands alone without a standby. All backups are performed on the instance. In this case, the performance of the instance decreases during a backup.
- Backup operations of an ApsaraDB RDS instance on RDS High-availability Edition or RDS Enterprise Edition are performed on the secondary instance. Therefore, they do not occupy CPU resources
of the primary instance or affect its performance.
- How do I query data from backup files at fast speeds?
If you have full logical backup files, you can use DBS to query data from these files. This way, you do not need to restore the data of these files. For more information, see Overview.
- Can I disable the data backup feature for my RDS instance?
No, you cannot disable the data backup feature for your RDS instance. However, you can reduce the data backup frequency to as low as twice a week. The retention period for data backup files must be at least seven days.
- Can I disable the log backup feature for my RDS instance?
Yes, you can disable the log backup feature for your RDS instance. You can disable the log backup feature for your RDS instance in the ApsaraDB RDS console.
- Why did my backup task fail?
A possible cause is that you executed time-consuming DDL statements or UPDATE statements when your backup task was in progress. These statements triggered locks on tables, and your backup task failed as a result of the locks.
- Why is the size of a snapshot backup file significantly larger than the amount of
data on my RDS instance?
If your RDS instance uses standard or enhanced SSDs, ApsaraDB RDS takes snapshots to back up your RDS instance. The size of a snapshot backup file may be significantly larger than the amount of data. Therefore, the free quota for backup storage that is allocated to an RDS instance that uses standard or enhanced SSDs is four times the free quota for backup storage that is allocated to an RDS instance that uses local SSDs. For more information, see Backup storage pricing for an ApsaraDB RDS for MySQL instance.Note When ApsaraDB RDS calculates the size of a snapshot backup file, it counts in all the non-empty blocks to which data is written. If the write operations are scattered among blocks, none of the blocks is empty. For example, if 3 MB of data is written across two, three, or four blocks, none of these blocks is empty. In this case, ApsaraDB RDS counts in all these blocks to calculate the total size. As a result, the size of the snapshot backup file is larger than the actual amount of data.
References
Related operations
Category | Operation | Description |
---|---|---|
ApsaraDB RDS | Modify backup settings | Modifies the backup settings of an RDS instance. |
Query backup settings | Queries the backup settings of an RDS instance. | |
Query the data backup files | Queries the data backup files of an RDS instance. | |
Query backup tasks | Queries the backup tasks of an RDS instance. |