I was working with a migration process to migrate the Postgresql Database from Ec2(centos) to AWS RDS. Since I did many migrations to RDS but this is my first migration with Postgresql. The challenge was the source database in Postgresql 9.2 and I wanted to 9.6 on RDS. So decided to configure bucardo replication centos.
EC2 instance with CentOs 6.5 (you can use this for centos 6.9, 7.0+)
Postgresql 9.2 on CentOs
RDS with Postgresql 9.6
Connectivity between Ec2 to RDS.
Source Database bhuvi.
Now lets kick start the process.
Install Postgresql 9.2:
Initialize the Postgresql Cluster and start the service:
Prepare the Source Database:
Prepare a Database for Bucardo:
Add directories for Bucardo service:
Install Bucardo Package:
Source file for Bucardo:
Setup pgpass file:
Install bucardo on its own database:
This will ask to verify the configurations, f you see the username or DB name get changes press the num ber you want to change.
Export the Source and Target Database details:
Export the table that we want to replicate:
You can use space to add multiple tables.
Take a dump without data:
Restore the dump on the target database:
Add source and destination database to Bucardo:
Add tables to the Bucardo:
Start Sync the tables:
Yeah!!! we are done. Query the Target table and you can see the data there.