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
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: […]
Restore PostgreSQL db from backup
psql -U username -h host1 dbname < infile_name_sql