This topic describes how to back up an ApsaraDB RDS for PostgreSQL instance. You can configure a backup policy that is used to automatically back 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 space. Each RDS instance is allocated with a free tier of backup space. If your usage exceeds the capacity of the free tier, you must pay for the extra backup space that you use. We recommend that you specify a backup cycle based on your business requirements to maximize the usage of the allocated backup space. For more information, see View the free quota of backup space.
  • You must be familiar with the billing methods and billable items. For more information, see Pricing, billing items, and billing methods.
  • You must be familiar with the billing of backup space usage. For more information, visit ApsaraDB for RDS pricing.
  • Do not perform data definition language (DDL) operations during a backup. If you do so, the backup may fail due to table locks.
  • We recommend that you back up your RDS instance during off-peak hours.
  • If the data volume is large, backing up your RDS instance may require a long time.
  • Backup files are retained based on the specified retention period. We recommend that you download the backup files you require to your computer before they are deleted.

Overview of data and log backups

Database engine Data backup Log backup
PostgreSQL These are backups of the data files of your RDS instance. Both physical backup and snapshot backup are supported. You can use the data backup files to restore your RDS instance. Your RDS instance performs physical or snapshot backup based on the storage media that you use:
  • Local SSDs support full physical backup.
  • Standard and enhanced SSDs support snapshot backup. You can use snapshot backups to restore your RDS instance to a new RDS instance. You cannot download snapshot backups.
Note Only physical backups are available in the ApsaraDB for RDS console. However, you can export logical backups to your computer. For more information, see Create a logical backup for an ApsaraDB RDS for PostgreSQL instance.
These are backups of the archived binary log files of your RDS instance.
Note The Basic Edition does not support the log backup function.

Configure a backup policy that is used to automatically back up your RDS instance

ApsaraDB for RDS automatically backs up your RDS instance based on the specified backup policy.

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the target RDS instance resides.
  3. Find the target RDS instance and click its ID.
  4. In the left-side navigation pane, click Backup and Restoration.
  5. On the Backup and Restoration page, click the Backup Settings tab and then the Edit button.
  6. Configure the following parameters.
    Parameter Description
    Data Retention Period The period to retain data backup files. Valid values: 7 to 730. Default value: 7. Unit: days.
    Note If your RDS instance is running PostgreSQL 10 and the Basic Edition, the data retention period is set to seven days and cannot be changed.
    Backup Cycle The cycle to create backups. You can select one or more days within a week.
    Note To ensure data security, 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. We recommend that you schedule the backup to run during an off-peak hour.
    Log Backup The switch to enable or disable the log backup function. If you disable this function, all binary log files are deleted, and you cannot restore your RDS instance to a specific point in time.
    Log Retention Period
    • The period to retain binary log files. Valid values: 7 to 730. Default value: 7. Unit: days.
    • The log retention period must be less than or equal to the data retention period.
    Backup Settings
  7. Click OK.

Manually back up your RDS instance

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the target RDS instance resides.
  3. Find the target RDS instance and click its ID. The Basic Information page appears.
  4. In the upper-right corner, click Back Up Instance. In the dialog box that appears, configure parameters as prompted and click OK.
  5. In the upper-right corner, click the Task Progress icon to view the status of the backup task.View Task Progress
    Note After the backup task is complete, you can go to the Backup and Restoration page to download the data backup file. Some RDS instances do not support the download of data backup files. For more information, see Download data and log backup files.Download backup

FAQ

  1. Can I disable the data backup function of my ApsaraDB RDS for PostgreSQL instance?

    No, you cannot disable the data backup function of your ApsaraDB RDS for PostgreSQL instance. The data backup function must be enabled. However, you can reduce the backup frequency to as low as twice a week.

  2. Can I disable the log backup function of my ApsaraDB RDS for PostgreSQL instance?

    Yes, you can log on to the ApsaraDB for RDS console and navigate to the Backup Settings tab to disable the log backup function of your ApsaraDB RDS for PostgreSQL instance.

Related operations

Operation Description
Create backup set Creates a data backup for an ApsaraDB for RDS instance.
Query backup sets Queries the data backup files of an ApsaraDB for RDS instance.
Query backup settings Queries the backup settings of an ApsaraDB for RDS instance.
Modify backup settings Modifies the backup settings of an ApsaraDB for RDS instance.
Delete backup sets Deletes one or more data backup files from an ApsaraDB for RDS instance.
Query backup tasks Queries the backup tasks of an ApsaraDB for RDS instance.
Query binary logs Queries the binary log files of an ApsaraDB for RDS instance.