Re: Automating backup

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Automating backup
Дата
Msg-id 874q3g20bh.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на Automating backup  (Richard Sydney-Smith <richard@ibisau.com>)
Ответы Re: Automating backup  (Richard Sydney-Smith <richard@ibisau.com>)
Список pgsql-general
Richard Sydney-Smith <richard@ibisau.com> writes:

>       pch := pchar('pg_dump -C -h '+host+' -U '+usr+' -p '+pswd+ ' -f
> '+bckup_path+' '+dbase);
>
> to postgres.
>
> as the operator is obviously logged in how do I
> (1) trap their user id
> (2) Send the call to pg_dump without knowing their password?
>
> I expect this is a well worn route and am hoping not to have to
> reinvent a wheel.

I don't think it's "well-worn" at all--everyone I've ever heard of
runs pg_dump from a cron script.

Why not have a shell script run by the operator that runs pg_dump and
then calls psql to insert the log record (assuming the dump succeeds)?
Putting the logic inside of the database doesn't seem to buy you
anything AFAICS.

-Doug

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

Предыдущее
От: Michael Crozier
Дата:
Сообщение: Re: News from IBM (DB2)
Следующее
От: Arun Kannapiran
Дата:
Сообщение: PgSQL as part of commercial product