This topic describes how to back up an ApsaraDB RDS for PostgreSQL instance. You can configure a backup policy based on which ApsaraDB RDS automatically backs up your RDS instance. If you do not configure a backup policy, the default backup policy is used. You can also manually back up your RDS instance.

Precautions

  • Backup files occupy backup storage. Each RDS instance is allocated a free quota for backup storage. If the amount of backup storage that you use exceeds the free quota, you are charged for the excess backup storage that you use. We recommend that you specify a backup cycle based on your business requirements to maximize the usage of the free backup storage. For more information about the free quota for backup storage, see View the free quota for backup storage of an ApsaraDB RDS for PostgreSQL instance.
  • We recommend that you familiarize yourself with the billing methods and billable items of backup storage. For more information, see Billable items, billing methods, and pricing.
  • We recommend that you familiarize yourself with the billing standards of backup storage. For more information, see Backup fees for an ApsaraDB RDS for PostgreSQL instance.
  • 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 your RDS instance has a large amount of data, a backup may require a long period of time.
  • Backup files are retained for a specified period of time. Before the specified retention period elapses, we recommend that you download the backup files that you need to your computer.

Overview of data backups and log backups

Database engine Data backup Log backup
PostgreSQL Data backups are copies of the data of your RDS instance. These backups include physical backups and snapshot backups. You can use these backups to restore the data of your RDS instance. For more information, see Restore the data of an ApsaraDB RDS for PostgreSQL instance. Your RDS instance automatically performs physical backups or snapshot backups based on the type of storage media that you use:
  • If your RDS instance is equipped with local SSDs, full physical backups are supported.
  • If your RDS instance is equipped with standard SSDs or enhanced SSDs (ESSDs), snapshot backups are supported. You can restore the data of your RDS instance from snapshot backup files to a new RDS instance. You cannot download snapshot backup files.
Note You can perform only physical backups in the ApsaraDB RDS console. However, you can export logical backup files to your computer. For more information, see Create a logical backup for an ApsaraDB RDS for PostgreSQL instance.
Log backups are copies of the archived binary log files of your RDS instance.
Note If your RDS instance runs the RDS Basic Edition, log backups are not supported.

Configure a backup policy for an RDS instance

After you configure a backup policy for an RDS instance, ApsaraDB RDS automatically backs up the RDS instance based on the backup policy.

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the left-side navigation pane, click Backup and Restoration.
  3. On the Backup and Restoration page, click the Backup Settings tab. In the Data Backup Settings section of the tab that appears, click Edit.
  4. Configure the parameters and click Save. The following table describes the parameters.
    Parameter Description
    Data Backup Retention (Days) The number of days for which you want to retain data backup files. Valid values: 7 to 730. Default value: 7.
    Note This parameter takes effect only for data backup files that are generated from regular backups. This parameter does not take effect for data backup files that are generated from single-digit second backups.
    Backup Cycle The cycle based on which you want to perform a backup. You can select one or more days of the week.
    Note For data security purposes, we recommend that you select at least two days of the week.
    Single-digit Second Backup The switch that is used to enable or disable the single-digit second backup feature. If you enable this feature, ApsaraDB RDS can complete each backup in 1 second.
    Note
    • This feature is supported only for RDS instances that are equipped with ESSDs.
    • If you enable this feature, ApsaraDB RDS performs a single-digit second backup and a regular backup on the data of the RDS instance based on the values of the Backup Cycle and Backup Time parameters.
    • If you enable this feature, each manual backup is performed as a single-digit second backup. For more information, see Manually back up an RDS instance.
    • The retention period of single-digit second backup files is fixed to seven days.
    Backup Time The hour at which you want to perform a backup.
    Log Backup The switch that is used to enable or disable the log backup feature. If you disable this feature, all log backup files are deleted and you cannot restore the data of the RDS instance to a specified point in time.
    Log Retention Period (Days)
    • The number of days for which you want to retain log backup files. Valid values: 7 to 730. Default value: 7.
    • The log backup retention period must be shorter than or equal to the data backup retention period.

Manually back up an RDS instance

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the upper-right corner of the page, click Back Up Instance. In the dialog box that appears, configure the parameters and click OK.
    Physical Backup mode
  3. In the upper-right corner of the page, click the Task Progress icon to view the progress of the backup task. Wait until the backup task is completed.
    View the progress of a backup task
    Note After the backup task is completed, you can go to the Backup and Restoration page to download the backup file that is generated. Some RDS instances do not support the download of backup files. These RDS instances include RDS instances that are equipped with standard SSDs or ESSDs. For more information, see Download the data backup files and log backup files of an ApsaraDB RDS for PostgreSQL instance.
    Download backup files

FAQ

  1. 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.

  2. Can I disable the log backup feature for my RDS instance?

    Yes, you can disable the log backup feature for your RDS instance. To disable the log backup feature, perform the following steps: Log on to the ApsaraDB RDS console, go to the Backup Settings tab, and modify the backup settings to disable the log backup feature.

Related operations

Operation Description
Create a backup task Creates a data backup for an ApsaraDB RDS instance.
Query the data backup files Queries the data backup files of an ApsaraDB RDS instance.
Query backup settings Queries the backup settings of an ApsaraDB RDS instance.
Modify backup settings Modifies the backup settings of an ApsaraDB for RDS instance.
Delete backup sets Deletes the data backup files of an ApsaraDB for RDS instance.
Query backup tasks Queries the backup tasks of an ApsaraDB for RDS instance.
Query log backup files Queries the log backup files of an ApsaraDB RDS instance.