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 the RDS instance. If you do not configure a backup policy, the default backup settings are used. You can also manually back up the 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, billing items, and billing methods.
  • You must be familiar with the pricing of backup storage. For more information, see the pricing information at ApsaraDB for RDS.
  • Do not execute data definition language (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 data volume is large, backing up your RDS instance may require a long time.
  • Backup files are retained based on the specified retention period. Before the 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 in the databases on your RDS instance. These include physical and snapshot backups. You can use these backups to restore your RDS instance. Your RDS instance automatically creates physical or snapshot backups based on the storage media that you use:
  • Local 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 for 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 function.

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

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

  1. Log on to the ApsaraDB for RDS console.
  2. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where the target RDS instance resides.
    Select a region
  3. Find the target instance and click the instance 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 and click OK.
    Backup Settings dialog box
    Parameter Description
    Data Backup Retention 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 the RDS instance runs PostgreSQL 10 on RDS Basic Edition, the data backup retention period is seven days and cannot be changed.
    Backup Cycle The cycle based on which you want to create a backup. You can select one or more days of the week.
    Note To ensure data security, we recommend that you back up the RDS instance at least twice a week.
    Backup Time The hour at which you want to create a backup.
    Log backup The switch that is used to enable or disable the log backup function. If you disable this function, all of the log backup files are deleted and you cannot restore the RDS instance to a point in time.
    Log Retention Period
    • 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.

Manually back up an RDS instance

  1. Log on to the ApsaraDB for RDS console.
  2. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where the target RDS instance resides.
    Select a region
  3. Find the target instance and click the instance ID.
  4. 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.
  5. In the upper-right corner of the page, click the Task Progress icon to view the progress of the backup task.
    View the progress of the backup task
    Note After the backup task is complete, 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. For more information, see Download data and log backup files from an ApsaraDB RDS for PostgreSQL instance.Download a backup file

FAQ

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

    No, you cannot disable the data backup function of your RDS 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 RDS instance?

    Yes, you can disable the log backup function of your RDS instance by following these steps: Log on to the ApsaraDB for RDS console, navigate to the Backup Settings tab, and modify the backup settings to disable the log backup function.

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 log backup files of an ApsaraDB for RDS instance.