Re: >>>>> pg_dump in crontab

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Iwan Tutuka Pambudi <itpambudi(at)yahoo(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: >>>>> pg_dump in crontab
Date: 2001-01-17 08:51:35
Message-ID: 200101170851.f0H8pat25751@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Iwan Tutuka Pambudi wrote:
>$ crontab -l
>30 23 * * * pg_dump test > test.out
>
>I got an error massage
>/bin/sh: pg_dump: command not found
>
>$ which pg_dump
>/usr/local/pgsql/bin/pg_dump

cron has a very limited search list for executables; you should set PATH
in the command or use the full pathname for pg_dump:

30 23 * * * /usr/local/pgsql/bin/pg_dump test > test.out

or

30 23 * * * PATH=/usr/local/pgsql/bin:$PATH pg_dump test > test.out

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"And, behold, I come quickly; and my reward is with me,
to give every man according as his work shall be."
Revelation 22:12

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew W. Nosenko 2001-01-17 08:52:30 Re: pg_log
Previous Message Colin Taylor 2001-01-17 08:26:30 Questions about Synonyms