.pgpass ftw!
It is useful when you want to do automatically backup database in my case.
(I use Fabric to run the command.)
What you need to do is creating .pgpass
in your home directory of the account you are using to backup your database.
The example of the content in .pgpass
shows as below.
localhost:5432:[databasename]:[databaseuser]:[databaseuserpassword]
ref: http://stackoverflow.com/questions/2893954/how-to-pass-in-password-to-pg-dump
Written by keerati
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Postgresql
Authors
Related Tags
#postgresql
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#