Backup and restoration (Serverless mode)

Updated at:
Copy as MD

AnalyticDB for PostgreSQL in Serverless mode provides the backup and restoration feature as of V1.0.0.0. This feature is enabled by default. After instance data is removed, the data is automatically archived and retained for a period of time based on a backup policy.

Billing rules

The backup and restoration feature is not separately billed. Backup data uses disk storage and may incur storage charges. For more information about the billing methods and pricing of disk storage, see Pricing.

Backup policy

AnalyticDB for PostgreSQL in Serverless mode performs incremental backup for data that is added or removed within a backup cycle without compressing the data. The default backup cycle is seven days, and the ratio of backup to data storage is about 68%. For example, assume that an instance contains 1 TB of base data and 100 GB of data is updated every day. Seven days later, the instance has 1 TB of base data and 700 GB of backup data.

You can execute the following statement to query the retention period of the backup data:

SHOW rds_cn_vacuum_archive_storage_life;

To change the retention period of the backup data, Submit a ticket.

Query backup records

Connect to the AnalyticDB for PostgreSQL instance in Serverless mode and execute the following statement in the postgres database:

SELECT * FROM adbpg_tabbak.adbpg_basebackup_task;

The following table describes the fields in the adbpg_basebackup_task table.

Field

Data type

Description

task_id

TEXT

The ID of the task.

sched_id

TEXT

The sched_id of the task.

start_time

TIMESTAMPTZ

The start time of the backup.

Note

The start time of the backup is the point in time to which the data can be restored.

end_time

TIMESTAMPTZ

The end time of the backup.

backupgroup

INT

The backup group. The base backup and the subsequent log backups belong to the same backup group.

parent_task_id

TEXT

The ID of the parent task.

task_type

CHAR

The backup type. Valid values:

  • S: base backup (full backup).

  • I: log backup (incremental backup).

failed

BOOLEAN

Specifies whether the backup has failed. Valid values:

  • f: The backup is successful.

  • t: The backup failed.

Note

For AnalyticDB for PostgreSQL instances in Serverless mode that are created on and after March 5, 2022, you can query backup records from the adbpg_basebackup_task table. For AnalyticDB for PostgreSQL instances in Serverless mode that are created before March 5, 2022, you must Submit a ticket to query backup records.

Restore data

AnalyticDB for PostgreSQL in Serverless mode does not allow you to restore data on your own. To restore data, Submit a ticket.