Re: Scheduled back up

Поиск
Список
Период
Сортировка
От Viorel Dragomir
Тема Re: Scheduled back up
Дата
Msg-id 03a201c34d1e$cc24d770$0600a8c0@fix.ro
обсуждение исходный текст
Ответ на Re: Scheduled back up  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Список 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@vio.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@wildenhain.de>
To: "Viorel Dragomir" <bc@vio.ro>
Cc: <shridhar_daithankar@persistent.co.in>; "Pgsql-General"
<pgsql-general@postgresql.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@persistent.co.in>
> > To: "Pgsql-General" <pgsql-general@postgresql.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@postgresql.org)
> >
>
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Tino Wildenhain
Дата:
Сообщение: Re: Scheduled back up
Следующее
От: "Vilson farias"
Дата:
Сообщение: Lost indexes