patternsqlModerate
Local Backup from Amazon RDS PostgreSQL database
Viewed 0 times
postgresqllocaldatabaseamazonrdsfrombackup
Problem
I have a PostgreSQL database on an Amazon RDS instance.
I want to have a local dump of this instance.
So far, I've tried with this:
But it keeps throwing an error, saying that the server refuse the connection, and check if the server is actually running on port
All my credentials and DB path/codes are correct.
I want to have a local dump of this instance.
So far, I've tried with this:
PGPASSWORD="Password" pg_dump -h mydb.xxxxxx.us-east-1.rds.amazonaws.com -p 5432But it keeps throwing an error, saying that the server refuse the connection, and check if the server is actually running on port
5432, which is actually doing.All my credentials and DB path/codes are correct.
Solution
You must be running in a Security Group firewall problem.
- Go to your RDS Dashboard, select Instances and open the instance you want to connect to.
- Look for a line like this :
Security Groups rds-launch-wizard (sg-3e9axxx) ( active ). You should be able to click onrds-launch-wizard (sg-3e9axxx)which leads you to the EC2 Dashboard in theSecurity Groupspanel.
- Select your security group and open the
InboundTab in the lower panel.
- Click on
EditandAdd Rule. Don't forget to set thePort Rangeto 5432 and selectMy IPin the source.
- Click on
Save.
- You should be able to connect to your RDS Instance from your local IP.
Context
StackExchange Database Administrators Q#102916, answer score: 10
Revisions (0)
No revisions yet.