Archive for the ‘PostgreSQL’ Category

HowTo pg_dump with no password

Ever wanted to have pg_dump running via cron? Well… now you can! Create a file called .pgpass in your user directory and put following content inside: localhost:5432:db_name:db_login:db_pass**** Note: might also be useful to put permissions right: chmod 0600 ~/.pgpass

Posted on January 25, 2012 at 16:53 by admin · Permalink · Leave a comment
In: English, PostgreSQL

Restore PostgreSQL db from backup

psql -U username -h host1 dbname < infile_name_sql

Posted on January 20, 2012 at 10:25 by admin · Permalink · Leave a comment
In: English, PostgreSQL