Re: >>>>> pg_dump in crontab - Mailing list pgsql-general

From Oliver Elphick
Subject Re: >>>>> pg_dump in crontab
Date
Msg-id 200101170851.f0H8pat25751@linda.lfix.co.uk
Whole thread Raw
In response to >>>>> pg_dump in crontab  (Iwan Tutuka Pambudi <itpambudi@yahoo.com>)
List 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.Elphick@lfix.co.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



pgsql-general by date:

Previous
From: Colin Taylor
Date:
Subject: Questions about Synonyms
Next
From: "Andrew W. Nosenko"
Date:
Subject: Re: pg_log