How exciting it must be to create a database cluster under a CDS Free Trial offer and really experience EDB's Cloud Database Service, or to do a POC and be fully confident your database is working well with an application!
As you may be aware, any cluster created under CDS Free Trial offer will be live for 48 hrs from the time it spins up. However, if you would like to retain your data or would like to move your database to a more permanent state (CDS Paid Console), how could you possibly do that?
Below is a solution that will guide you in moving data from a CDS Free Trial console to your CDS Paid Console using logical backup(pg_dump) and restore(pg_restore) command. It's an offline method and may require downtime to migrate the data.
Source Database [Cloud (Public/Private) Or on-prem Instance ]
Postgres V11 on Centos 7
In order to test, I created 5 tables and inserted sample data.
Target Database [CDS Instance on Paid/Production Console]
Postgres V11 on CentOS 7
Step 1: Spin up an EC2 instance in cloud or provision a machine in your own data center. I have used CentOS 7 for my testing in AWS.
Step 2: Connect to the machine and install Postgres client (you don't have to create a database).
Step 3: Configure a YUM Repository.
Please configure the PostgreSQL repository in your system by using below command for CentOS 7:
Step 4: Install PostgreSQL 11 on CentOS
After enabling PostgreSQL YUM repository in your system, use the following command to install PostgreSQL 11 on your system with YUM Package Manager.
yum install postgresql11-server
Step 5: Switch to Postgres user "sudo su - postgres"
Step 6: Performing Backup
Execute below command to take a logical backup of the Source Database (Postgres V11)
./pg_dump -h <Host> -p <Port> -d <Database> -U <DBUser> -Fc -f <Filename>
./pg_dump -h 22.214.171.124 -p 9999 -d postgres -U postgres -Fc -f /tmp/backup_source.dmp
Step 7: Performing Restore
Execute the below command to restore the logical backup reference in the previous step to the target Database (Postgres V11).
./pg_restore -h <Host> -p <Port> -d <Database> -U <DBUser> <Filename>
./pg_restore -h 126.96.36.199 -p 9999 -d postgres -U postgres /tmp/backup_source.dmp
Step 8: Data Validation:
This is necessary so we can we can verify that the number of rows in the table is the same as the source.
I hope this is helpful. If you have any question regarding migration or the related solution, please feel free to comment or send an email to