Re: RE: can't run pg_dump in sh script using crontab

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Kogotkov, Vyacheslav" <Vyacheslav(dot)Kogotkov(at)artificial-life(dot)com>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: RE: can't run pg_dump in sh script using crontab
Date: 2001-02-10 15:37:40
Message-ID: 005101c09377$6935d1e0$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: "Kogotkov, Vyacheslav" <Vyacheslav(dot)Kogotkov(at)artificial-life(dot)com>

> PG_VERSION contains 7.0
> I have a single version of Postgres, so pg_dump
> is the same version. File HISTORY contains "Release 7.0.3".
> I connect to linux as user "oracle". He has an access to
> database "dbname" and can SELECT data using psql. As far as
> I remember, I create this database as user "oracle".
> I usually start postmaster as user "oracle".
> And I edit crontab as "oracle".
> As "oracle", I can run this shell script by hand and get a good
> dump file.
> But I get nothing if I run it using cron.
> I think, may be oracle pg_dump can't find database
> "dbname" when it runs by crontab ?

Make sure you set any environment variables you need. You are probably
missing a path or one of the PGxxx environment vars.

- Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kogotkov, Vyacheslav 2001-02-10 15:41:37 RE: RE: can't run pg_dump in sh script using crontab
Previous Message Alexander Jerusalem 2001-02-10 15:36:17 7.1 installation problem