The cloud migration feature of ApsaraDB RDS for PostgreSQL allows you to migrate data from a self-managed PostgreSQL instance that is deployed on an Elastic Compute Service (ECS) instance or in a data center to an ApsaraDB RDS for PostgreSQL instance. This topic describes how to create an account for data migration on a self-managed PostgreSQL instance.
Procedure
The account that you create must have the CREATE ROLE, REPLICATION, and pg_monitor permissions. If an account that has these permissions is created on the self-managed PostgreSQL instance, you can proceed to update the pg_hba.conf file. For more information, see Update the pg_hba.conf file of a self-managed PostgreSQL instance.
Connect to the self-managed PostgreSQL instance and create an account that is used for cloud migration. In the following example, an account named migratetest is created:
CREATE USER migratetest CREATEROLE REPLICATION LOGIN PASSWORD '123456';
NoteThe password of the account in the preceding command is an example. You can specify a custom password.
Grant the pg_monitor permission to the migratetest account.
GRANT pg_monitor TO migratetest;
What to do next
Update the pg_hba.conf file of a self-managed PostgreSQL instance