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 with a free quota for backup storage. If your backup storage usage exceeds the free quota, you must pay for the extra backup storage that you use. We recommend that you specify a proper 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.
  • You must be familiar with the billing methods and billable items of backup storage. For more information, see Pricing, billable items, and billing methods.
  • You must be familiar with the pricing of backup storage. For more information, see the ApsaraDB RDS pricing page.
  • 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 amount of data is large, a long period of time may be required to back up your RDS instance.
  • Backup files are retained for a specific retention period. Before the specific retention period elapses, we recommend that you download the required backup files to your computer.

Overview of data and log backups

Database engine Data backup Log backup
PostgreSQL Data backups are copies of the data from the databases that are created on your RDS instance. These backups include physical backups and snapshot backups. You can use these backups to restore your RDS instance. For more information, see Restore the data of an ApsaraDB RDS for PostgreSQL instance. Your RDS instance automatically creates physical or snapshot backups based on the storage media that you use:
  • SSDs support full physical backups.
  • Standard and enhanced SSDs support snapshot backups. You can use snapshot backup files to restore data to a new RDS instance. You cannot download snapshot backup files.
Note Only physical backups are supported 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 that are generated on your RDS instance.
Note The Basic Edition does not support the log backup feature.

Configure a backup policy based on which ApsaraDB RDS automatically backs up your RDS instance

ApsaraDB RDS automatically backs up your RDS instance based on the backup policy that you specify.

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, click Backup and Restoration.
  3. On the Backup and Restoration page, click the Backup Settings tab and then the Edit button.
  4. Configure the following parameters and click OK.
    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. Unit: days.
    Note
    • If your RDS instance runs PostgreSQL 10 on RDS Basic Edition, the data backup retention period is fixed to seven days and cannot be changed.
    • This parameter takes effect only for the data backups files that are generated by regular backups. This parameter does not take effect for the data backup files that are generated by the Single-digit Second Backup feature.
    Backup Cycle The cycle based on which you want to create a backup. You can select one or more days of the week.
    Note For data security purposes, we recommend that you back up your RDS instance at least twice a week.
    Backup Time The hour at which you want to create a backup. Unit: hours.
    Log Backup The switch that is used to enable or disable the log backup feature. If you disable this feature, all the log backup files are deleted and you cannot restore your RDS instance to a specific 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 less than or equal to the data backup retention period.
    Single-digit Second Backup The switch that is used to enable or disable the Single-digit Second Backup feature. After you enable this feature, ApsaraDB RDS can complete each backup within 1 second.
    Note
    • This feature is supported only for RDS instances that use enhanced SSDs.
    • After you enable this feature, ApsaraDB RDS performs a single-digit second backup and a regular backup of data based on the specified Backup Cycle and Backup Time parameters.
    • After you enable this feature, each manual backup is performed as a single-digit second backup. For more information, see Manually back up your RDS instance.
    • The retention period for single-digit second backup files is fixed to seven days.

Manually back up your RDS instance

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the upper-right corner of the page, click Back Up Instance. In the dialog box that appears, configure the required 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 the backup task
    Note After the backup task is completed, you can go to the Backup and Restoration page to download the backup file. Some RDS instances do not support the download of backup files. These RDS instances include the RDS instances that use standard or enhanced SSDs. For more information, see Download the data 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. The data backup feature must be enabled. However, you can reduce the backup frequency to at least twice a week.

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

    Yes, you can perform the following steps to disable the log backup feature for your RDS instance: 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 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 RDS instance.
Delete backup sets Deletes one or more data backup files from an ApsaraDB RDS instance.
Query backup tasks Queries the backup tasks of an ApsaraDB RDS instance.
Query log backup files Queries the log backup files of an ApsaraDB RDS instance.