AWS remote Postgres DB backup

By Rajdeep Kaur

After googling for sometime I thought of connecting my database with the help psql after I will connect I will use pg_dump but didnโ€™t work then I thought of trying with pgadmin3. with it I was able to download a empty dump file as aws has some rds-admin because of which we cannot take dump after we connecting to database as a specific role.

Then i thought of a hack that ๐Ÿ˜œ

pg_dumpdatabase_ name > dumpfile.sql

will give me the download dump of particular db. Why not without entring inside the db take the dump and the it wonโ€™t show the permission denied. then i got the following command to download dump of remote db

pg_dump -h evo10 > dumpfile.sql

But the above didnโ€™t work for me as by default it was taking rdsadmin as user name so with some i combined the psql login command with pg_dump command.

pg_dump -h -U user-name -d dbname > dump.sql

Hope this helps to you all ๐Ÿ˜ƒ ๐Ÿ˜„ ๐Ÿ˜‰.