Postgres dump using password on command line

From: Ankur Kaushik <ankurkaushik(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Postgres dump using password on command line
Date: 2015-06-15 08:54:31
Message-ID: CALXoLqyOvKQtnq5-LOz7r9M2zSHCJM12AXk_jaxmtLTcK37vFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I have made script for the postgresql dump but unable to get dump only
using command line as it require the password when execute the script.

list of database command require Password after enter

psql -l -t | cut -d'|' -f1 | sed -e 's/ //g' -e '/^$/d'

same for pg_dump

pg_dump $i|gzip > $backupfile

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Thomas Kellerer 2015-06-15 08:58:01 Re: Postgres dump using password on command line
Previous Message Alvaro Herrera 2015-06-14 19:42:53 Re: Problem after upgrade from 9.3.6 to 9.3.(7-8)