Re: PostgreSQL Backup Script

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Vishal Kashyap (at) [SaiHertz]" <vishalonlist(at)gmail(dot)com>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, pgsql-php(at)postgresql(dot)org
Subject: Re: PostgreSQL Backup Script
Date: 2005-04-01 13:50:30
Message-ID: 20050401135030.GA26112@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On Fri, Apr 01, 2005 at 11:18:13 +0530,
"Vishal Kashyap @ [SaiHertz]" <vishalonlist(at)gmail(dot)com> wrote:
> > I suggest allowing the 'postgres' user to connect with 'ident sameuser'
> > in pg_hba.conf from the localhost only, then always just run pg_dump as
> > 'postgres'.
>
> That means
>
> # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
> host <mydb> <myuser> localhost 255.255.255.255
> ident sameuser
>
> only <myuser> will NOT be asked for password when it does
> pg_dump -U <myuser>
> when logged in to its shell account with <myuser>
> and If I run a crontab with user <myuser> the above lines again stands true.
>
>
> What you say ?

Don't do this as a host entry if your OS supports domain sockets with
getpeerid. Use a 'local' entry. That way you don't need to run an ident
server.

You also have the option to set up custom map entries so that the OS user
is not the same as the DB user.

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Christopher Kings-Lynne 2005-04-03 03:00:40 Re: sql command
Previous Message Christopher Kings-Lynne 2005-04-01 12:55:31 Re: migrate data