pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Victor Yegorov <viktors.jegorovs@nordlb.lv>
To: Nathalie Boulos <nathalieboulos@hotmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Backup passwd protected DB
Date: Mon, 26 May 2003 12:59:03 +0300
Message-ID: <20030526095903.GB18253@nordlb.lv> (raw)
In-Reply-To: <BAY8-F45J8VrRQvXlao00008054@hotmail.com>
References: <BAY8-F45J8VrRQvXlao00008054@hotmail.com>

* Nathalie Boulos <nathalieboulos@hotmail.com> [26.05.2003 12:49]:
> Hello,
> 
> I need to backup a postgresql-7.3.2 DB with a user having a password using 
> cron.
> 
> every time i call pg_dump I get prompted for a password. It's OK if i'm 
> running it from command line. But when i use cron, the backup couldn't be 
> executed because no password is given.
> 
> I don't want to put the password in clear text in any file for security 
> reasons, and i don't want to grant read access to a "backup" user with no 
> password.
> 
> is there any solution to dump that database?

In my case, I've created a separate user, without OS password, stored DB
password in ~/.pgpass with proper permissions.

Now, to access OS user, I need to enter root console and make `su'.

You can also write a little script, that would do sily `encoding' of your
password, say - XOR it with some value. It'll be harder to see real
password.

-- 

Victor Yegorov



view thread (2+ messages)

Message-ID: <20030526095903.GB18253@nordlb.lv>
Permalink:  ../20030526095903.GB18253@nordlb.lv/
Also on:    postgresql.org/message-id/20030526095903.GB18253@nordlb.lv

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: viktors.jegorovs@nordlb.lv, nathalieboulos@hotmail.com
  Subject: Re: Backup passwd protected DB
  In-Reply-To: <20030526095903.GB18253@nordlb.lv>
  References: <BAY8-F45J8VrRQvXlao00008054@hotmail.com> <20030526095903.GB18253@nordlb.lv>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox