Try (do not use ">" output stream redirection, but "-f" switch):
0 20 * * 5 /usr/pgsql/bin/pg_dump -F c database -f /usr/backup/friDATE4.pgdump
0 20 * * 4 pg_dump -F c database -f /usr/backup/thurDATE06-3.pgdump
Or instead (if it will not work):
1. Put those commands into root crontab file (/var/spool/cron/root)
2. Instead raw putting the commands into crontab file, put them into scripts and run for them the shell - for example:
0 20 * * 5 /bin/sh /home/scripts/fri_date4.sh
0 20 * * 4 /bin/sh /home/scripts//thur_date06-3.sh

Into /home/scripts/fri_date4.sh You put line:
/usr/pgsql/bin/pg_dump -F c database -f /usr/backup/friDATE4.pgdump
Into /home/scripts//thur_date06-3.sh You put line:
pg_dump -F c database -f /usr/backup/thurDATE06-3.pgdump

Greetings
Adam

Nirav Parikh wrote:

Hi,
I am having problem backing up database from crontab, I got following lines in crontab file 0 20 * * 5 /usr/pgsql/bin/pg_dump -F c database > /usr/backup/friDATE4.pgdump
0 20 * * 4 pg_dump -F c database > /usr/backup/thurDATE06-3.pgdump
none of them works, I have given full permission to everyone in /usr/backup directory it creates the dump file but with 0 size - empty! I have other commands in crontab which executes normally, also pg_dump command works through command line. does anyone what else I can check?
Regards*, *

* *

* *

*Nirav*



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to