You can configure a backup policy to adjust the cycles of RDS data backup and log backup and as a result, RDS enables the auto-backup feature. You can also manually back up RDS data.

Instance backup files occupy backup space. Charges are incurred if the used space exceeds the free quota. You must design a backup cycle appropriately to cater the service requirements based on the available backup space. For detailed charges, see # View the free quota of the backup space. As for the charging standard for backup space usage, see Pricing.

Backup policies

ApsaraDB supports data backup and log backup. To recover data by time, you must enable the log backup function. The following table lists the backup policies applicable to different database types:

Database type Data backup Log backup
MySQL
  • MySQL 5.5/5.6/5.7 (including high-availability edition and finance edition):
    • Automatic backup supports full physical backup.
    • Manual backup supports full physical backup, full logical backup, and single-database logical backup.
  • MySQL 5.7 (Basic Edition) backup files 
    • retained for a maximum period of 7 days,
    • and does not support a logical backup.
  • MySQL 5.7 (High-availability Edition)
    • does not support a logical backup.
  • After being generated, binlogs (500 MB per log) are compressed and uploaded immediately. Local files are deleted within 24 hours.
  • Binlog files occupy instance disk capacity. Using the Binlog Upload function, you can upload Binlog files to the OSS. This does not affect the data recovery function and stops the Binlog files from occupying instance disk space.
SQL Server
  • Supports full physical backup and incremental physical backup.
  • Automatic backup uses the cycle Full Backup-Incremental Backup-Incremental Backup.
    • For example, if a full backup is performed on Monday,
    • incremental backups are performed on Tuesday and Wednesday,
    • another full backup is performed on Thursday,
    • then incremental backups on Friday and Saturday, and so on.
    • If a full backup is manually performed at any time in the backup cycle, the next two backups are incremental backups.
  • The SQL Server always compresses transaction logs during the backup process.
  • On the Backup and Recovery page of the target instance’s management console, you can click Compress Transaction Log to manually compress the transaction log.
Included in data backup; individual transaction logs are not provided for download.
PostgreSQL Supports full physical backup. After being generated, write-ahead logs (WALs) (16 MB per log) are compressed and uploaded immediately. Local files are deleted within 24 hours.
PPAS Supports full physical backup. After being generated, WALs (16 MB per log) are compressed and uploaded immediately. Local files are deleted within 24 hours.

Automatic backup (Backup policy setting)

After you configure a backup policy, RDS automatically backs up databases based on the policy.

Note
The following uses MySQL 5.7 (High-availability Edition) as an example.
  1. Log on to the RDS console .
  2. Click the ID of the instance to visit the Basic Information page.
  3. Select Backup and Recovery in the left-side navigation pane.
  4. On the Backup and recovery page, select Backup cycle and click Edit.
  5. On the Backup cycle page, set backup specifications and click OK. The parameters are explained as follows: Parameter description:


    Parameters Description
    Retention Days:
    • Specifies the number of days when backup files are retained. The default value is 7 days. The value range is 7-730 days.
    • MySQL 5.7 SSD cloud (Basic edition) backup files can be reserved for free for at least 7 days.
    Backup cycle:
    • You can set it to one or multiple days in a week.
    • SQL Server, PostgreSQL, and PPAS instances are backed up daily by default and this cannot be modified.
    Backup time: This value can be set to any time; units: hours.
    Log Retention Days:
    • Specifies the number of days when the log backup files are retained. The default value is 7 days.
    • The value range is 7-730 days and it must be less than or equal to the value of the retention days.

Manual backup

Note
MySQL Single-database logical backup is used as an example.
  1. Log on to the RDS console.
  2. Select the region where the target instance is located.
  3. Click the ID of the instance to visit the Basic Information page.
  4. Click Backup instance in the upper right corner.


    Note
    • Backup mode and backup policy: Different types of engines support different backup policies. For more information, see Backup policies

    • During single-database backup, click > to add data to be backed up to the database. If you do not have a database, Create a database first.

  5. After seting the backup method and backup policy, click OK.