Re: Automated Database Backups

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: John Iliffe <john(dot)iliffe(at)iliffe(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Automated Database Backups
Date: 2010-10-16 16:18:04
Message-ID: 4CB9D03C.8060805@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 15/10/2010 22:12, John Iliffe wrote:
> Does anyone have a way to run pg_dump from cron in a way that doesn't
> require someone to enter the password on every run? I get the following
> error even when the backup user has read permissions on all application
> databases.

You need to use a .pgpasss file:

http://www.postgresql.org/docs/9.0/static/libpq-pgpass.html

You can instead specify the password in an environment variable, but
that potentially makes it visible to all users on the system, so the
.pgpass is better.

HTH,

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gary Chambers 2010-10-16 16:19:02 Re: Automated Database Backups
Previous Message Alexander Farber 2010-10-16 16:15:30 Constraint: string length must be 32 chars