Re: Backup passwd protected DB

From: "Victor Yegorov" <viktors(dot)jegorovs(at)nordlb(dot)lv>
To: "Nathalie Boulos" <nathalieboulos(at)hotmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Backup passwd protected DB
Date: 2003-05-26 09:59:03
Message-ID: 20030526095903.GB18253@nordlb.lv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

* Nathalie Boulos <nathalieboulos(at)hotmail(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mendola Gaetano 2003-05-26 10:52:35 What does mean: NUMBER OF INDEX' TUPLES (21539) IS NOT THE SAME AS HEAP (18607)'
Previous Message Nathalie Boulos 2003-05-26 09:29:27 Backup passwd protected DB