The cloud migration feature of ApsaraDB RDS for PostgreSQL instance allows you to migrate the data of a self-managed PostgreSQL instance to an Elastic Compute Service (ECS) instance or 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.

  1. 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';
    Note The password of the account in the preceding command is an example. You can specify a custom password.
  2. 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