Обсуждение: automatic pg_dumpall

Поиск
Список
Период
Сортировка

automatic pg_dumpall

От
Victor Sudakov
Дата:
Colleagues,

If I have to organize an automatic nightly pg_dumpall, how do I handle
authentication ? I do not want to create a passwordless superuser (or
trust method in pg_hba.conf), and there is noone to enter the password
manually.  Is there another recipe?

Thanks in advance for any input.

--
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/149@fidonet http://vas.tomsk.ru/

Re: automatic pg_dumpall

От
Kemin Zhou
Дата:
Victor Sudakov wrote:

>Colleagues,
>
>If I have to organize an automatic nightly pg_dumpall, how do I handle
>authentication ? I do not want to create a passwordless superuser (or
>trust method in pg_hba.conf), and there is noone to enter the password
>manually.  Is there another recipe?
>
>Thanks in advance for any input.
>
>
>
use crontab
run this daily
su - postgres -c "/usr/local/pgsql/bin/pg_dump -b -Ft -f db.tar -h
machine_name_of_db your_db"

Kemin






**********************************************************************
Proprietary or confidential information belonging to Ferring Holding SA or to one of its affiliated companies may be
containedin the message. If you are not the addressee indicated in this message (or responsible for the delivery of the
messageto such person), please do not copy or deliver this message to anyone. In such case, please destroy this message
andnotify the sender by reply e-mail. Please advise the sender immediately if you or your employer do not consent to
e-mailfor messages of this kind. Opinions, conclusions and other information in this message represent the opinion of
thesender and do not necessarily represent or reflect the views and opinions of Ferring. 
**********************************************************************


Re: automatic pg_dumpall

От
Victor Sudakov
Дата:
Kemin Zhou wrote:
>>
>>If I have to organize an automatic nightly pg_dumpall, how do I handle
>>authentication ? I do not want to create a passwordless superuser (or
>>trust method in pg_hba.conf), and there is noone to enter the password
>>manually.  Is there another recipe?
>>
>>Thanks in advance for any input.
>>
>>
>>
> use crontab
> run this daily
> su - postgres -c "/usr/local/pgsql/bin/pg_dump -b -Ft -f db.tar -h
> machine_name_of_db your_db"


I am afraid you did not understand my question. In your scenario,
pg_dump will ask for the authentification of the user "postgres". I
have already stated above that I do not want to create a passwordless
superuser (or trust method in pg_hba.conf).

>
> Kemin
>
>
>
>
>
>
> **********************************************************************
> Proprietary or confidential information belonging to Ferring Holding SA or to one of its affiliated companies may be
containedin the message. If you are not the addressee indicated in this message (or responsible for the delivery of the
messageto such person), please do not copy or deliver this message to anyone. In such case, please destroy this message
andnotify the sender by reply e-mail. Please advise the sender immediately if you or your employer do not consent to
e-mailfor messages of this kind. Opinions, conclusions and other information in this message represent the opinion of
thesender and do not necessarily represent or reflect the views and opinions of Ferring. 
> **********************************************************************
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/149@fidonet http://vas.tomsk.ru/

Re: automatic pg_dumpall

От
Bruno Wolff III
Дата:
On Thu, Mar 25, 2004 at 04:21:16 +0000,
  Victor Sudakov <vas@mpeks.no-spam-here.tomsk.su> wrote:
> Colleagues,
>
> If I have to organize an automatic nightly pg_dumpall, how do I handle
> authentication ? I do not want to create a passwordless superuser (or
> trust method in pg_hba.conf), and there is noone to enter the password
> manually.  Is there another recipe?

Who do you trust? If you trust the system account that pg_dump is running
under (and if you don't you have problems) and pg_dump is being run on
the same machine as the postgres server, use a domain socket connection
and ident authentication. This doesn't work on all OS's, but in works on
a number of common ones.