backup of postgres scheduled with cron

Поиск
Список
Период
Сортировка
От Sorin N. Ciolofan
Тема backup of postgres scheduled with cron
Дата
Msg-id 20071122131908.F1D0F8E40FC@mailhost.ics.forth.gr
обсуждение исходный текст
Ответ на Re: EAV or not to EAV?  (Oleg Bartunov <oleg@sai.msu.su>)
Ответы Re: [ADMIN] backup of postgres scheduled with cron  ("Marco Bizzarri" <marco.bizzarri@gmail.com>)
Re: backup of postgres scheduled with cron  (jef.peeraer@telenet.be)
Re: backup of postgres scheduled with cron  (Frank Wittig <fw@weisshuhn.de>)
Список pgsql-general
Hello all!

I've a small bash script backup.sh for creating dumps on my Postgre db:

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

I've edited crontab and added a line:

00 4 * * * swkm /home/swkm/services/test/backup.sh

to execute the backup.sh as user swkm daily at 4 am.

The user swkm is the user I use to create backups manually. The script
itself is executed fine if run manually but run on cron scheduler I got an
mydb_dump_$time.out file empty (of 0 kb)

Do you have any idea about what's wrong?

Thanks
Sorin





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

Предыдущее
От: luca.ciciriello@email.it
Дата:
Сообщение: BEGIN strange behaviour
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: BEGIN strange behaviour