Moving a Database from a CDS Free Trial Console to a CDS Paid/Production Console
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.
For the ability to create a cluster on the CDS Paid Console, please update the Billing section located under the Accounts tab which grants you access to the CDS Paid Console available on additional regions.
Once you create a cluster on the CDS Paid Console, you can then migrate the existing data from the CDS Free Trial cluster to the desired cluster.
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
Migration Steps From CDS Free Trial to CDS Paid Console
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: