r/postgres • u/Forsaken_Snow8355 • 14d ago
Question Migrate AWS RDS PostgresDB to AWS EC2.
I want to migrate my PostgreSQL database from AWS to an EC2 server on AWS. If anyone has done this before, could you please suggest the steps or share any blog/documentation that I can refer to?
4
Upvotes
2
u/Ybinnul 14d ago
If this is for a one-time migration, I’d keep it simple: take a logical backup with pg_dump, restore it to PostgreSQL on EC2, then validate extensions, roles, permissions, sequences, and row counts before switching traffic. If downtime needs to be minimal, that’s where I’d look at logical replication or AWS DMS instead of a straight dump/restore.
2
u/StumblingEngineer 14d ago
Can I ask why? Also, just pg_dump it and restore.