0

My team has hosted a django project in AWS with a Postgres RDS instance. What is the proper way to get export the database into SQL or pg_dump?

  • 1
    Use pg_dump. I don't understand the problem. – Craig Ringer Sep 12 '16 at 5:37
2

There is an interesting thing in RDS postgresql. I had the same issue, normal pg_dump won't work. Use the below command

pg_dump -Fc -v -h [endpoint of instance] -U [master username] [database] > [database].dump

Refer link: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Procedural.Importing.html

  • 1
    What does 'won't work' mean? Also, 'normal'? – dezso Sep 12 '16 at 7:10
  • Pg_dump -h endpoint -d db -u user > back.sql this command won't work for RDS, it'll trigger some errors while restoring the db – Bhuvanesh Sep 12 '16 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.