Re: Scheduled back up

From: "Viorel Dragomir" <bc(at)vio(dot)ro>
To: "Tino Wildenhain" <tino(at)wildenhain(dot)de>
Cc: <shridhar_daithankar(at)persistent(dot)co(dot)in>, "Pgsql-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Scheduled back up
Date: 2003-07-18 11:21:55
Message-ID: 03a201c34d1e$cc24d770$0600a8c0@fix.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sincerely i dunno why this happens and after couple of emails received two
days ago I stoped searching why.
In any case I need it to dump for custom users their dbs data from a php
script.
And now it works, but if i gave the same cmd which run through exec the
pg_dump force me to introduce the user_name and password to continue.

I add some of my emails received about this story.

"Viorel Dragomir" <bc(at)vio(dot)ro> writes:
> In 7.3.x the pg_dump accepts the password only from stdin. The user must
en=
> ter his password.
> It's a feature or a bug, because i can't see any logic in this behaviour.

It's a feature ... or at least an intentional change.

If you want to keep your password in a file, see the ~/.pgpass feature.

regards, tom lane

----------------------------------------------------------------------------
-------

Viorel Dragomir wrote:

> In 7.1.2 you can launch this command without any problems:
> pg_dump -u -s database < file.txt
>
> where file.txt contains 2 lines:
> username
> password
> ~
> ~
> ~
>
> And you'll get the dump of the <database>.
>
> In 7.1.3 this command work, the only incovenience is that pg_dump
> shows "User name: Password:"
> but gets the password from file.
>
> In 7.3.x the pg_dump accepts the password only from stdin. The user
> must enter his password.
> It's a feature or a bug, because i can't see any logic in this behaviour.

It's a feature :-)
The logic is that it is insecure to keep passwords in files.
If you are not concerned about the security in this case, you can switch
to ident or trust identification. That won't prompt you for the password.

Dima.

----- Original Message -----
From: "Tino Wildenhain" <tino(at)wildenhain(dot)de>
To: "Viorel Dragomir" <bc(at)vio(dot)ro>
Cc: <shridhar_daithankar(at)persistent(dot)co(dot)in>; "Pgsql-General"
<pgsql-general(at)postgresql(dot)org>
Sent: Friday, July 18, 2003 4:23 PM
Subject: Re: [GENERAL] Scheduled back up

> Hi Viorel,
>
> what are the exact circumstances for this? I'm not experiencing
> that behavior. Maybe it depends on your settings in pg_hba.conf?
> And are you using -X set-session-authorization and so on?
>
> Regards
> Tino Wildenhain
>
> Viorel Dragomir wrote:
> > As i experienced with pg_dump it looks like in ver.7.3 requires
interactive
> > enter password for *custom users*.
> >
> > The 7.1 will not make this kind of problems.
> >
> > Still in 7.3 you can make it with cron, but as i know, only with a
script
> > which might look like this
> >
> > <?php
> > exec("pg_dump -u [other options] db_name <
/path_to/password_file.txt >
> > the_dumped_file");
> > ?>
> > where password_file.txt contains:
> > user_name
> > user_password
> >
> > good luck, and if u find that i already said is wrong please notify me
> > [2 days ago i've send [almost] the same problem and this is the only
answer
> > that i got it]
> >
> > ----- Original Message -----
> > From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
> > To: "Pgsql-General" <pgsql-general(at)postgresql(dot)org>
> > Sent: Friday, July 18, 2003 1:35 PM
> > Subject: Re: [GENERAL] Scheduled back up
> >
> >
> >
> >>On 18 Jul 2003 at 15:58, Kallol Nandi wrote:
> >>
> >>>How to go about scheduled backup in Postgresql.
> >>
> >>You need to use cron and pgdump. Man pages for both of them will give
you
> >
> > what
> >
> >>you want.
> >>
> >>Bye
> >> Shridhar
> >>
> >>--
> >>Cohen's Law: There is no bottom to worse.
> >>
> >>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 6: Have you searched our list archives?
> >>
> >> http://archives.postgresql.org
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> >
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vilson farias 2003-07-18 11:26:59 Lost indexes
Previous Message Viorel Dragomir 2003-07-18 10:39:19 Re: Scheduled back up