RDS automatically backs up data based on the default backup policy. You can also modify the automatic backup settings or manually back up RDS data.

Precautions

  • Instance backup files occupy backup space. You are allocated a free quota of backup space, and backups that exceed the free quota incur charges. We recommend that you design a backup cycle that meets your requirements and the limits of the free quota. For more information about the free quota of the backup space, see View the free quota of the backup space for an RDS for PostgreSQL instance.
  • For more information about the billing methods and billing items, see Billing methods and billable items.
  • For more information about the billing standard for backup space usage, see ApsaraDB RDS for MySQL pricing.
  • Do not perform DDL operations during backup because the backup may fail due to table locks.
  • Back up data during off-peak hours.
  • Backing up a large volume of data may take a long time.
  • The backup files are only retained for a certain period of time. Download the backup files you need in time.

Backup description

Database engine Data backup Log backup
PostgreSQL Supports full physical backup. Write-ahead logs (WALs) (16 MB per log) are compressed and uploaded immediately after they are generated. Local files are deleted within 24 hours.

Modify the automatic backup settings

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

  1. Log on to the RDS console.
  2. Select the target region.Select a region
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, click Backup and Restoration.
  5. On the Backup and Restoration page that appears, click the Backup Settings tab and click Edit.
  6. Configure the following parameters.
    Parameter Description
    Data Retention Period You can specify the number of days when data backup files are retained. The default value is 7 days. The value range is 7 to 730 days.
    Note Backup files of PostgreSQL 10 Basic Edition can only be retained for seven days. This parameter cannot be modified.
    Backup Cycle You can specify more than one day in a week.
    Backup Time You can specify any period of time in a day. Unit: hours.
    Log Backup You can enable or disable the log backup function.
    Notice If you disable log backup, all the log backup files are deleted, and you cannot restore data by time point.
    Log Retention Period
    • You can specify the number of days when the 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 data retention period.
    Note PostgreSQL 10 Basic Edition does not allow you to back up log files.
    Backup settings
  7. Click OK.

Manually back up an RDS for PostgreSQL instance

If the PostgreSQL version and edition are PostgreSQL 11 High-availability Edition (with standard SSDs) or PostgreSQL 10 High-availability Edition (with standard SSDs), follow these steps:

  1. Log on to the RDS console.
  2. Select the target region.Select a region
  3. Find the target RDS instance and click the instance ID.
  4. In the left-side navigation pane, choose Backup and Restoration > Data Backup.
  5. In the upper-left corner of the page, click Instance Backup.Instance Backup
  6. In the message that appears, click OK.

If the PostgreSQL version and edition are PostgreSQL 10 High-availability Edition (with local SSDs), PostgreSQL 10 Basic Edition, or PostgreSQL 9.4, follow these steps:

  1. Log on to the RDS console.
  2. Select the target region.Select a region
  3. Find the target RDS instance and click the instance ID.
  4. In the upper-right corner of the Basic Information page, click Back Up Instance. Back Up Instance
  5. Click OK.

FAQ

  1. Can I disable the data backup function for an RDS for PostgreSQL instance?

    No, but you can decrease the backup frequency, but to no less than twice a week.

  2. Can I disable the log backup function for an RDS for PostgreSQL instance?

    Yes, you can log on to the RDS console and navigate to the Backup Settings tab to disable the log backup function for an instance in the PostgreSQL 10 High-availability Edition (with local SSDs) or PostgreSQL 9.4.

APIs

API Description
CreateBackup Creates a backup for an RDS instance.
DescribeBackups Queries the list of backups for an RDS instance.
DescribeBackupPolicy Queries a backup policy for an RDS instance.
ModifyBackupPolicy Modifies a backup policy for an RDS instance.