Archive for January, 2012

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

How to install PostgreSQL with yum

How to install PostgreSQL with yum – step by step guide: Note: Right now do everything as “root” user. 1) check current install status: yum list postgres* 2) Pick packages you might need (in that sample this is my choice – you might want different packages): yum install postgresql84 postgresql84-contrib postgresql84-libs 3) Install default DB: […]

Posted on January 20, 2012 at 10:36 by admin · Permalink · Leave a comment
In: Uncategorized

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