You can configure a backup policy to adjust the cycles of RDS data backup and log backup. 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 set a backup cycle appropriately to cater to the service requirements based on the available backup space. For information about the free quota, see View the free quota of the backup space. To view 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:
    • Supports only snapshot-based backup instead of logical backup.
    • Backup files are retained for at most 7 days for free.
  • 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 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 cycles from full backup, incremental backup to incremental backup. For example, if a full backup is performed on Monday, incremental backups are performed on Tuesday and Wednesday, and another full backup is performed on Thursday,with incremental backups on Friday and Saturday. If a full backup is manually performed at any time in the backup cycle, the next two backups are incremental backups.
  • 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 transaction logs.
Log backup is included in data backup, and transaction logs cannot be 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 (Setting backup policies)

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. Click Backup and Recovery in the left-side navigation pane.
  4. On the Backup and Recovery page, select Backup Settings and click Edit.
  5. In the Backup Cycle dialog box, set backup parameters and click OK.

    The parameters are explained as follows:



    Parameters Description
    Data Retention Period (days)
    • Specifies the time period during which backup files are retained. The default value is 7 days. The value range is 7 to 730 days.
    • MySQL 5.7 Basic Edition backup files are retained for free for at most 7 days.
    Backup Cycle Frequency
    • You can set it to one or multiple days in a week.
    • SQL Server, PostgreSQL, and PPAS instances are backed up every day by default, which cannot be modified.
    Next Backup This parameter can be set to any time. Units: Hour
    Log Backup Possible values are Enable and Disable.
    Log Retention Period (days)
    • Specifies the number of days during which log backup files are retained. The default value is 7 days.
    • The value range is 7 to 730 days and it must be less than or equal to the value of the retention days.

Manual backup

Note
The following procedure describes how to configure the single-database logical backup for MySQL 5.7 Basic Edition.
  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 Back up Instance at the upper right corner.
  5. Set Backup Mode and Backup Policy.


    Note
    • The backup mode and policy vary with the database type. For more information, see Backup policies
    • If you choose single-database backup, click > to select a database to be backed up. If you do not have a database, create one by referring to Create a database.
  6. Click OK.