Re: pg_dump from crontab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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*




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux