Re: pg_dump from crontab
От | Adam Radlowski |
---|---|
Тема | Re: pg_dump from crontab |
Дата | |
Msg-id | 44DC1E52.5050802@informatyka.gdansk.pl обсуждение исходный текст |
Ответ на | pg_dump from crontab ("Nirav Parikh" <niravp@alliancerecruitment.com.au>) |
Список | pgsql-admin |
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* >
В списке pgsql-admin по дате отправления: