Re: backup of postgres scheduled with cron

Поиск
Список
Период
Сортировка
От Frank Wittig
Тема Re: backup of postgres scheduled with cron
Дата
Msg-id 47458B84.7000503@weisshuhn.de
обсуждение исходный текст
Ответ на backup of postgres scheduled with cron  ("Sorin N. Ciolofan" <ciolofan@ics.forth.gr>)
Ответы Re: backup of postgres scheduled with cron  ("Sorin N. Ciolofan" <ciolofan@ics.forth.gr>)
Список pgsql-general
Hello Sorin!

Sorin N. Ciolofan wrote:

>     #!/bin/bash
>     time=`date '+%d'-'%m'-'%y'`
>     cd /home/swkm/services/test
>       pg_dump mydb > mydb_dump_$time.out

You should output STDERR to some error logfile or set MAILTO in your
crontab.
I guess you then would have seen an error message saying that pg_dump
was not found because cron doesn't load the users environment and
therefore PATH variable isn't set.
I suggest you call pg_dump in your script by absolute path.

Greetings,
Frank Wittig


Вложения

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

Предыдущее
От: "Marco Bizzarri"
Дата:
Сообщение: Re: [ADMIN] backup of postgres scheduled with cron
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: [ADMIN] backup of postgres scheduled with cron