Re: [ADMIN] backup of postgres scheduled with cron - Mailing list pgsql-general

From Marco Bizzarri
Subject Re: [ADMIN] backup of postgres scheduled with cron
Date
Msg-id 3f0d61c40711220528k32a69464j6d37c584b8e93484@mail.gmail.com
Whole thread Raw
In response to backup of postgres scheduled with cron  ("Sorin N. Ciolofan" <ciolofan@ics.forth.gr>)
Responses Re: [ADMIN] backup of postgres scheduled with cron  ("Sorin N. Ciolofan" <ciolofan@ics.forth.gr>)
Re: [ADMIN] backup of postgres scheduled with cron  (Andrew Sullivan <ajs@crankycanuck.ca>)
List pgsql-general
On Nov 22, 2007 2:19 PM, Sorin N. Ciolofan <ciolofan@ics.forth.gr> wrote:
> 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
>

Hi Sorin,

why don't you add a "MAILTO=<youraddress>" at the start of your
crontab file, so that you can receive a report of the problem?

Regards
Marco

--
Marco Bizzarri
http://iliveinpisa.blogspot.com/

pgsql-general by date:

Previous
From: "Francesco Esposito"
Date:
Subject: Re: BEGIN strange behaviour
Next
From: luca.ciciriello@email.it
Date:
Subject: Re: BEGIN strange behaviour