From: | "Swanepoel, Barrie" <barries(at)uj(dot)ac(dot)za> |
---|---|
To: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Cronjob errors |
Date: | 2007-11-16 05:25:40 |
Message-ID: | 850B6BE405AA674CB6C39EADC7CFC6E1751DC1@apk-exch-01.ad.uj.ac.za |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I am trying to make a pg_dumpall via a cronjob. Using Redhat ES release
4 (Nahant Update 5) and postgresql-7.4.17-1.RHEL4.1.
The error I get is:
Date: Wed, 14 Nov 2007 04:00:01 +0200
From: root(at)localhost(dot)localdomain (Cron Daemon)
To: root(at)localhost(dot)localdomain
Subject: Cron <postgres(at)localhost> /usr/local/bin/dspace_postgres_backup
>1
+/dev/null
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <HOME=/>
X-Cron-Env: <LOGNAME=postgres>
X-Cron-Env: <USER=postgres>
/bin/bash: 1: No such file or directory
My shell script in /usr/local/bin is:
#!/bin/bash
FNAME=dspace.`date +%F`.backup
#echo $FNAME
/usr/bin/pg_dumpall -c -o > /data/dspace_backups/$FNAME
gzip /data/dspace_backups/$FNAME
My crontab in /etc is:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
00 4 * * * postgres /usr/local/bin/dspace_postgres_backup >1 /dev/null
Any advise will be appreciated!
From | Date | Subject | |
---|---|---|---|
Next Message | Phillip Smith | 2007-11-16 05:41:26 | Re: Cronjob errors |
Previous Message | Sean Davis | 2007-11-16 02:57:00 | Re: Building full-text index |