Updated on 2024-04-11 GMT+08:00

Backup Solutions

RDS supports automated and manual backups. You can periodically back up databases. If a database is faulty or data is damaged, you can restore the database using backups to ensure data reliability.

RDS uses sysbench to import data models and a certain amount of data. After data is backed up, the compression ratio is about 80%. The more duplicate data there is, the higher the compression ratio is.

Compression ratio = Space occupied by backup files/Space occupied by data files x 100%

Backup Types

  • Full backup: A full backup is to back up all data, even if no data has changed since the last backup.

    Full backup can be initiated manually or automatically.

  • Incremental backup: Incremental backups refer to Write-Ahead Logging (WAL) backups. RDS performs an incremental backup every 5 minutes.

How RDS Backs Up Data

  • Single instance

    A single-node instance, which is more cost-effective than a primary/standby DB instance. After a backup is triggered, data is backed up from the primary instance and stored as a package on OBS. The backup does not take up storage space of the instance.

  • Primary/standby instance

    In a primary/standby pair, each instance has the same instance class. After a backup is triggered, data is backed up from the primary instance and stored as a package on OBS. The backup does not take up storage space of the instance.

    If a database or table in the primary instance is maliciously or mistakenly deleted, the database or table in the standby instance will also be deleted. In this case, you can only use backups to restore the deleted data.

    Figure 1 How RDS backs up data

Backup Solutions

Table 1 describes how to back up data and download backups.

Table 1 Backup solutions

Task

Backup Type

Description

Backing up data in the same region

Automated backups

RDS automatically creates full backups for your instance during a backup window you specified and saves the backups based on the configured retention period. If necessary, you can restore data to any point in time within the backup retention period.

Once the automated backup policy is enabled, a full physical backup is triggered immediately. After that, full backups will be created according to the specified time window and backup cycle.

Manual backups

Manual backups are user-initiated full backups of instances. The backup method is physical backup. Manual backups will not be deleted until you delete them manually.

Incremental backups

WAL is enabled for RDS for PostgreSQL instances by default. RDS automatically backs up data modifications made after the most recent automated or incremental backup every 5 minutes.

Downloading backups

Downloading full backups

You can use OBS Browser+, the browser, or the download URL to download a full backup.

Downloading incremental backups

You can download incremental backups.

Billing

Backups are saved as packages in OBS buckets. Backups occupy backup space in OBS. If the free space RDS provides is used up, the additional space required will be billed. For details, see How Is RDS Backup Data Billed?

Deleting Backups

Backups can be deleted in different ways:
  • Manual backups can only be manually deleted.
  • Automated backups cannot be manually deleted. To delete them, set the retention period specified in your automated backup policy. Retained backups will be automatically deleted at the end of the retention period.