This topic describes how to use the pg_basebackup utility provided by open source PostgreSQL to create a full backup of your ApsaraDB RDS for PostgreSQL instance and export the backup files to your computer.
Prerequisites
- The IP address of your ECS instance or local host is added to a whitelist of your RDS instance. For more information, see Configure an IP address whitelist for an ApsaraDB RDS for PostgreSQL instance.
- Your ECS instance or local host runs the same version of PostgreSQL as your RDS instance.
Background information
In this topic, CentOS 7 and PostgreSQL 12 are used as examples of how to create a full backup.
Precautions
We recommend that you use the privileged account of your RDS instance or an account that has the REPLICATION permission. Otherwise, you may have permission issues during creation.
Procedure
References
If you want to use the backup files to restore data, see Recovering Using a Continuous Archive Backup.